java WELD001408:部署Jhipster MicroService时,类型EurekaServerContext的依赖关系未得到满足
我从Jhipster应用程序构建了一些WAR文件,并试图将它们部署到Jboss上。在添加jboss部署结构之后。xml文件,我成功地部署了网关
不幸的是,微服务失败,原因如下:
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type EurekaServerContext with qualifiers @Default at injection point [UnbackedAnnotatedParameter] Parameter 1 of [UnbackedAnnotatedConstructor] @Inject com.netflix.eureka.resources.SecureVIPResource(EurekaServerContext) at com.netflix.eureka.resources.SecureVIPResource.(SecureVIPResource.java:0)
在其他类上还有7个类似的堆栈跟踪:VIPResource、ASGResource等
问题是我真的无法在com中更改任何内容。netflix。尤里卡套餐。。。 我在网上看到过类似的错误,其中一个解决方案是添加一个空的bean。xml文件转换为WEB-INF
不幸的是,这只会导致另一个错误:
javax.enterprise.inject.UnsatisfiedResolutionException: Unable to resolve a bean for 'javax.persistence.EntityManager' with qualifiers [@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()]. at org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension.createRepositoryBean(JpaRepositoryExtension.java:118) at org.springframework.data.jpa.repository.cdi.JpaRepositoryExtension.afterBeanDiscovery(JpaRepositoryExtension.java:94)
你知道这个问题有没有解决办法吗。。。还是另一种选择
注意:我使用Jboss是因为。。。公司限制。如果没有这些限制,我会选择基本的独立Tomcat执行,或者Docker容器
# 1 楼答案
我认为你需要排除焊接子系统
见:https://github.com/jhipster/generator-jhipster/issues/1303#issuecomment-87075166
我在jboss部署结构中做到了这一点。用于更老的jhipster应用程序的xml文件: