以前是在Spring Boot 1.5上,我正在迁移到Spring Boot 2.0.1。我收到以下错误:
异常:org.springframework.beans.factory.BeanCreationException。消息:创建名称为“ org.springframework.security.filterChainProxy”的bean时出错:在设置构造函数参数时无法解析对bean“ org.springframework.security.filterChains”的引用;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名称为“ org.springframework.security.filterChains”的bean时出错:设置bean属性时无法解析对bean“ org.springframework.security.web.DefaultSecurityFilterChain#4”的引用带有键[4]的“ sourceList”;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建名称为org.springframework.security.web.DefaultSecurityFilterChain#4的bean时出错:使用键[0]设置构造函数参数时,无法解析对bean'metadataGeneratorFilter'的引用;嵌套异常是org.springframework.beans.factory.BeanCreationException:在类路径资源[security / securityContext.xml]中定义名称为'metadataGeneratorFilter'的bean创建错误:无法创建内部bean'org.springframework.security.saml.metadata.MetadataGenerator设置构造函数参数时,类型为[org.springframework.security.saml.metadata.MetadataGenerator]的#1dc0c635';嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ org.springframework.security.saml.metadata.MetadataGenerator#1dc0c635”的bean时出错:通过方法“ setSamlWebSSOFilter”参数0表示的依赖关系未满足;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在类路径资源[security / securityContext.xml]中定义的名称为'samlWebSSOProcessingFilter'的bean时出错:设置bean属性'authenticationManager'时无法解析对bean'authenticationManager'的引用;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建名称为'org.springframework.security.authenticationManager'的bean时出错:在使用键[0]设置构造函数参数时,无法解析对bean'samlAuthenticationProvider'的引用;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ samlAuthenticationProvider”的bean时出错:通过方法“ setUDetails”参数0表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为'SAMLUserDetailsServiceImpl'的bean时出错:通过字段'uService'表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为'uService'的bean时出错:通过字段'passwordEncoder'表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为“ securityConfiguration”的bean时出错:通过字段“ uDetailsService”表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为'uDetailsService'的bean时出错:通过字段'empDataService'表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:创建文件[D:......... \ EmpDataService.class]中定义的名称为'empDataService'的bean时出错:通过构造函数参数2表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建名称为'employeeSearchRepository'的bean时出错:在设置bean属性'elasticsearchOperations'时无法解析对bean'elasticsearchTemplate'的引用;嵌套的异常是org.springframework.beans.factory.UnsatisfiedDependencyException:在类路径资源.............. / ElasticSearchConfiguration.class]中创建名称为“ elasticsearchTemplate”的bean时出错。方法'elasticsearchTemplate'参数0;嵌套的异常是org.springframework.beans.factory.BeanCreationException:创建在类路径资源[org / springframework / boot / autoconfigure / data / elasticsearch / ElasticsearchAutoConfiguration.class]中定义的名称为'elasticsearchClient'的bean时出错:通过工厂方法实例化Bean失败;嵌套的异常是org.springframework.beans.BeanInstantiationException:无法实例化[org.elasticsearch.client.transport.TransportClient]:工厂方法'elasticsearchClient'引发了异常;嵌套的异常是java.lang.InstantiationError:org.elasticsearch.common.transport.TransportAddress
gradle.build:
compile "org.elasticsearch:elasticsearch:5.5.0"
compile "org.hibernate:hibernate-envers:5.1.0.Final"
compile("org.liquibase:liquibase-core:${liquibase_core_version}") {
exclude(module: 'jetty-servlet')
}
compile "com.mattbertolini:liquibase-slf4j:${liquibase_slf4j_version}"
compile "org.springframework.boot:spring-boot-actuator"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.boot:spring-boot-loader-tools"
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-aop"
compile ("org.springframework.boot:spring-boot-starter-data-jpa")