在我们的项目中,我们做了一些Maven pom.xml清理,依赖项注入停止了工作。例如,这曾经起作用,但现在不再起作用了:
@Inject
private ItemService itemService;
public void whatever() {
itemService.whatever();
}当我们运行itemService时,whatever()是空的,日志中没有出现错误/警告消息。只有一个bean实现了这个接口:
public interface ItemService { ... }
@ContainerManaged
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class ItemServiceBean implements ItemService { ... }我们尝试将所有的依赖项返回到发生此错误的项目中,但这并没有帮助。我不知道该从哪里开始找。其中任何一项都会有帮助:
发布于 2012-11-29 15:32:56
在pom.xml中包含以下依赖项
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>https://stackoverflow.com/questions/13629076
复制相似问题