我尝试使用 Jersey 2.1
和 CDI
在我的Java EE 7
部署在 Glassfish 4.0.
上的项目
Jersey 模块依赖于 Guava libraries .但是使用带有 CDI 的 Guava 库 (14.0.1) 会导致引发以下异常。
CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)].
我该如何克服这个问题?
最佳答案
CDI 有一些可疑的行为。我们认为我们有两种解决方法:one that you can do yourself和 one that will work automatically when we release Guava 15.0 .您可以read more about the problem here .
关于jakarta-ee - 将 Jersey 2.1 与 CDI 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18187137/