我在野生动物10上部署我的耳朵时遇到了这样的错误:
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type SomeServices with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject someotherpackage.someService
at someotherpackage.someService(SomeClass.java:0)
Possible dependencies:
- Managed Bean [class mypackage.SomeServices] with qualifiers [@Any @Default],
- Managed Bean [class mypackage.SomeServices] with qualifiers [@Any @Default]
- 带有限定符的托管Bean [class mypackage.SomeServices] [@Any @Default]
原因:mypackage.SomeServices有2个位置(在wildfly / modules和EAR文件中)。
我可以设置范围,以便成功地在wildfly 10上提供和部署我的EAR。但在这种情况下,它不适用于wildfly 8.我如何兼顾wildfly 8和wildfly 10?我希望wildfly 8可以从wildfly / modules注入SomeServices。