在将Spring Boot应用程序部署到weblogic 12c中时。我遇到此CDI定义失败。
07:20:02.040 [[ACTIVE] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO org.springframework.data.mongodb.repository.cdi.MongoRepositoryExtension - Activating CDI extension for Spring Data MongoDB repositories.
07:20:03.568 [[ACTIVE] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.springframework.data.repository.cdi.CdiRepositoryExtensionSupport - Discovered repository type 'cashDeclaration.repository.CashDeclarationRepository' with qualifiers [@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()].
我使用了其他建议中的许多替代方法,例如使用@Inject批注和beans.xml文件。
但是似乎这是weblogic服务器上的spring-data初始化问题
private <T> CdiRepositoryBean<T> createRepositoryBean(Class<T> repositoryType, Set<Annotation> qualifiers,
BeanManager beanManager) {
// Determine the MongoOperations bean which matches the qualifiers of the repository.
Bean<MongoOperations> mongoOperations = this.mongoOperations.get(qualifiers);
if (mongoOperations == null) {
throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
MongoOperations.class.getName(), qualifiers));
}