请帮助我告诉我为什么在我的春季启动应用程序中返回此错误?
编辑:
我正在使用DataRepostory类扩展CRUDRepository以在couchbase db中执行crud操作
2015-08-29T02:36:24.000+00:00 [App/0] OUT Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataRepository': Cannot resolve reference to bean 'couchbaseTemplate' while setting bean property 'couchbaseOperations'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'couchbaseTemplate' defined in com.couch.CBConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.couchbase.core.CouchbaseTemplate]: Factory method 'couchbaseTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mappingCouchbaseConverter' defined in com.couch.CBConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter]: Factory method 'mappingCouchbaseConverter' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.support.ConversionServiceFactory.createDefaultConversionService()Lorg/springframework/core/convert/support/GenericConversionService;
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1145)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:543)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
2015-08-29T02:36:24.000+00:00 [App/0] OUT at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069)
依赖
"org.springframework.boot:spring-boot-starter-web:1.2.1.RELEASE"
'commons-lang:commons-lang:2.6'
'javax.validation:validation-api:1.1.0.CR2'
'com.fasterxml.jackson.core:jackson-databind:2.5.1'
'com.couchbase.client:couchbase-client:1.4.7'
"org.springframework.boot:spring-boot-starter-actuator
"org.springframework.data:spring-data-couchbase:1.2.1.RELEASE"
"org.springframework:spring-jdbc:4.1.5.RELEASE
org.springframework:spring-test:4.1.5.RELEASE
org.springframework.data:spring-data-couchbase:1.3.0.RELEASE
group: 'org.springframework.boot', name: 'spring-boot-starter-web',version: '1.2.2.RELEASE'
group: 'com.mangofactory', name: 'swagger-springmvc', version: '0.8.8'
group: 'org.ajar', name: 'swagger-spring-mvc-ui', version: '0.1'
答案 0 :(得分:3)
Spring 3.2将此方法列为已弃用的here;我怀疑发生了什么是你已经编译了仍然有这个方法的版本,但是试图在已经删除了弃用方法的环境中运行它。没有这种方法的那个会更新。检查两个地方的库版本,并确保每个地方只有一个这样的库。