在OpenLiberty、Java 8上,使用类
@Singleton(name = "AppContext")
@Startup
public class A implement B{
...
}
@ApplicationScoped
public class C{
@Inject
private A someA;
}
我得到了一个
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type A with qualifiers @Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedMethod] @Inject public someA....
我不明白为什么如果我dont implement any interface its working,但只要我add implement B it is not anymore!没有找到任何关于这方面的文档:(
谢谢!