2016-06-08 45 views
0

当我在此接口中取消注释此行时,Spring运行时出现错误。从运行方法findByName(String)的GraphRepository和自动生成代码不起作用

@Repository 
public interface PersonRepository extends GraphRepository<Person> 
{ 
    //Person findByName(String name); 
} 

输出:

2016-06-08 23:27:58.580 INFO 6723 --- [   main] o.s.d.neo4j.mapping.Neo4jMappingContext : Neo4jMappingContext initialisation completed 
2016-06-08 23:27:58.665 WARN 6723 --- [   main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: hello.PersonRepository hello.HomeController.personRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.springframework.data.neo4j.repository.query.GraphQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery; 
2016-06-08 23:27:58.671 INFO 6723 --- [   main] o.apache.catalina.core.StandardService : Stopping service Tomcat 
2016-06-08 23:27:58.695 ERROR 6723 --- [   main] o.s.boot.SpringApplication    : Application startup failed 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: hello.PersonRepository hello.HomeController.personRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.springframework.data.neo4j.repository.query.GraphQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery; 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE] 
    at hello.Application.main(Application.java:26) [classes/:na] 
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: hello.PersonRepository hello.HomeController.personRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.springframework.data.neo4j.repository.query.GraphQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery; 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    ... 17 common frames omitted 
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.springframework.data.neo4j.repository.query.GraphQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery; 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    ... 19 common frames omitted 
Caused by: java.lang.AbstractMethodError: org.springframework.data.neo4j.repository.query.GraphQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery; 
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:416) ~[spring-data-commons-1.11.4.RELEASE.jar:na] 
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:206) ~[spring-data-commons-1.11.4.RELEASE.jar:na] 
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:251) ~[spring-data-commons-1.11.4.RELEASE.jar:na] 
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:237) ~[spring-data-commons-1.11.4.RELEASE.jar:na] 
    at org.springframework.data.neo4j.repository.support.GraphRepositoryFactoryBean.afterPropertiesSet(GraphRepositoryFactoryBean.java:43) ~[spring-data-neo4j-4.1.1.RELEASE.jar:na] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE] 
    ... 29 common frames omitted 

2016-06-08 23:27:58.707 INFO 6723 --- [   main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/home/marcin/Praca%20magisterska/spring_data_neo4j/neo4j_connection/target/classes/, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-starter/1.3.5.RELEASE/spring-boot-starter-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot/1.3.5.RELEASE/spring-boot-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.3.5.RELEASE/spring-boot-autoconfigure-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.3.5.RELEASE/spring-boot-starter-logging-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar, file:/home/marcin/.m2/repository/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar, file:/home/marcin/.m2/repository/org/slf4j/jul-to-slf4j/1.7.21/jul-to-slf4j-1.7.21.jar, file:/home/marcin/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.21/log4j-over-slf4j-1.7.21.jar, file:/home/marcin/.m2/repository/org/springframework/spring-core/4.2.6.RELEASE/spring-core-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar, file:/home/marcin/.m2/repository/org/springframework/data/spring-data-neo4j/4.1.1.RELEASE/spring-data-neo4j-4.1.1.RELEASE.jar, file:/home/marcin/.m2/repository/org/neo4j/neo4j-ogm-core/2.0.1/neo4j-ogm-core-2.0.1.jar, file:/home/marcin/.m2/repository/org/neo4j/neo4j-ogm-api/2.0.1/neo4j-ogm-api-2.0.1.jar, file:/home/marcin/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar, file:/home/marcin/.m2/repository/org/neo4j/neo4j-ogm-compiler/2.0.1/neo4j-ogm-compiler-2.0.1.jar, file:/home/marcin/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar, file:/home/marcin/.m2/repository/org/neo4j/neo4j-ogm-http-driver/2.0.1/neo4j-ogm-http-driver-2.0.1.jar, file:/home/marcin/.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar, file:/home/marcin/.m2/repository/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar, file:/home/marcin/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/home/marcin/.m2/repository/org/springframework/data/spring-data-commons/1.11.4.RELEASE/spring-data-commons-1.11.4.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/spring-beans/4.2.6.RELEASE/spring-beans-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/spring-context/4.2.6.RELEASE/spring-context-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/spring-aop/4.2.6.RELEASE/spring-aop-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/home/marcin/.m2/repository/org/springframework/spring-expression/4.2.6.RELEASE/spring-expression-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/spring-tx/4.2.6.RELEASE/spring-tx-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar, file:/home/marcin/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.3.5.RELEASE/spring-boot-starter-web-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.3.5.RELEASE/spring-boot-starter-tomcat-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.0.33/tomcat-embed-core-8.0.33.jar, file:/home/marcin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.0.33/tomcat-embed-el-8.0.33.jar, file:/home/marcin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.33/tomcat-embed-logging-juli-8.0.33.jar, file:/home/marcin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.33/tomcat-embed-websocket-8.0.33.jar, file:/home/marcin/.m2/repository/org/springframework/boot/spring-boot-starter-validation/1.3.5.RELEASE/spring-boot-starter-validation-1.3.5.RELEASE.jar, file:/home/marcin/.m2/repository/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar, file:/home/marcin/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/home/marcin/.m2/repository/org/jboss/logging/jboss-logging/3.3.0.Final/jboss-logging-3.3.0.Final.jar, file:/home/marcin/.m2/repository/com/fasterxml/classmate/1.1.0/classmate-1.1.0.jar, file:/home/marcin/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.6/jackson-databind-2.6.6.jar, file:/home/marcin/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.6.6/jackson-annotations-2.6.6.jar, file:/home/marcin/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.6/jackson-core-2.6.6.jar, file:/home/marcin/.m2/repository/org/springframework/spring-web/4.2.6.RELEASE/spring-web-4.2.6.RELEASE.jar, file:/home/marcin/.m2/repository/org/springframework/spring-webmvc/4.2.6.RELEASE/spring-webmvc-4.2.6.RELEASE.jar] 

类人的执行情况:

@NodeEntity 
public class Person 
{ 
    @GraphId 
    private Long id; 
    private String name; 

    private Person() {} 

    public Person(String name) { this.name = name; } 

    (...) 

    public String getName() 
    { 
    return name; 
    } 

    public void setName(String name) 
    { 
    this.name = name; 
    } 
} 

我已经预计到春季产生findByName(串)的代码。我不明白为什么它不这样做,我不明白Java返回的错误。谁能解释这个问题吗?

- 从Maven的

树依赖性:

$ mvn dependency:tree -Dverbose 
[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Neo4j-CMS 0.0.1 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ Neo4j-CMS --- 
[WARNING] Using Maven 2 dependency tree to get verbose output, which may be inconsistent with actual Maven 3 resolution 
[INFO] org.marcin:Neo4j-CMS:jar:0.0.1 
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.3.5.RELEASE:compile 
[INFO] | +- org.springframework.boot:spring-boot:jar:1.3.5.RELEASE:compile 
[INFO] | | +- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - omitted for duplicate) 
[INFO] | | \- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.2.5.RELEASE; omitted for duplicate) 
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.5.RELEASE:compile 
[INFO] | | \- (org.springframework.boot:spring-boot:jar:1.3.5.RELEASE:compile - omitted for duplicate) 
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.5.RELEASE:compile 
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.1.7:compile 
[INFO] | | | +- ch.qos.logback:logback-core:jar:1.1.7:compile 
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.13; omitted for duplicate) 
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile 
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate) 
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.21:compile 
[INFO] | | | \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate) 
[INFO] | | \- org.slf4j:log4j-over-slf4j:jar:1.7.21:compile 
[INFO] | |  \- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.20; omitted for duplicate) 
[INFO] | +- org.springframework:spring-core:jar:4.2.6.RELEASE:compile 
[INFO] | \- org.yaml:snakeyaml:jar:1.16:runtime 
[INFO] +- org.springframework.data:spring-data-neo4j:jar:4.1.1.RELEASE:compile 
[INFO] | +- org.neo4j:neo4j-ogm-core:jar:2.0.1:compile 
[INFO] | | +- org.neo4j:neo4j-ogm-api:jar:2.0.1:compile 
[INFO] | | | +- (com.fasterxml.jackson.core:jackson-databind:jar:2.6.6:compile - version managed from 2.7.1; omitted for duplicate) 
[INFO] | | | +- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.14; omitted for duplicate) 
[INFO] | | | \- commons-codec:commons-codec:jar:1.10:compile 
[INFO] | | +- org.neo4j:neo4j-ogm-compiler:jar:2.0.1:compile 
[INFO] | | | \- (org.neo4j:neo4j-ogm-api:jar:2.0.1:compile - omitted for duplicate) 
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.4:compile 
[INFO] | +- org.neo4j:neo4j-ogm-http-driver:jar:2.0.1:compile 
[INFO] | | +- (org.neo4j:neo4j-ogm-api:jar:2.0.1:compile - omitted for duplicate) 
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile (version managed from 4.3.6) 
[INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile 
[INFO] | | | \- (commons-codec:commons-codec:jar:1.9:compile - omitted for conflict with 1.10) 
[INFO] | | \- commons-io:commons-io:jar:2.4:compile 
[INFO] | +- org.springframework.data:spring-data-commons:jar:1.11.4.RELEASE:compile (version managed from 1.12.1.RELEASE) 
[INFO] | | +- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | +- org.springframework:spring-beans:jar:4.2.6.RELEASE:compile 
[INFO] | | | \- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | +- (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.19; omitted for duplicate) 
[INFO] | | \- (org.slf4j:jcl-over-slf4j:jar:1.7.21:runtime - version managed from 1.7.13; omitted for duplicate) 
[INFO] | +- org.springframework:spring-context:jar:4.2.6.RELEASE:compile 
[INFO] | | +- org.springframework:spring-aop:jar:4.2.6.RELEASE:compile 
[INFO] | | | +- aopalliance:aopalliance:jar:1.0:compile 
[INFO] | | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | | \- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | +- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | \- org.springframework:spring-expression:jar:4.2.6.RELEASE:compile 
[INFO] | |  \- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | +- org.springframework:spring-tx:jar:4.2.6.RELEASE:compile (version managed from 4.2.5.RELEASE) 
[INFO] | | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | | \- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.21:compile 
[INFO] | \- (org.slf4j:jcl-over-slf4j:jar:1.7.21:compile - version managed from 1.7.19; scope updated from runtime; omitted for duplicate) 
[INFO] \- org.springframework.boot:spring-boot-starter-web:jar:1.3.5.RELEASE:compile 
[INFO] +- (org.springframework.boot:spring-boot-starter:jar:1.3.5.RELEASE:compile - omitted for duplicate) 
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.3.5.RELEASE:compile 
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.33:compile 
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.33:compile 
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:8.0.33:compile 
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.33:compile 
[INFO] |  \- (org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.33:compile - omitted for duplicate) 
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:1.3.5.RELEASE:compile 
[INFO] | +- (org.springframework.boot:spring-boot-starter:jar:1.3.5.RELEASE:compile - omitted for duplicate) 
[INFO] | +- (org.apache.tomcat.embed:tomcat-embed-el:jar:8.0.33:compile - omitted for duplicate) 
[INFO] | \- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile 
[INFO] |  +- javax.validation:validation-api:jar:1.1.0.Final:compile 
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile (version managed from 3.2.1.Final) 
[INFO] |  \- com.fasterxml:classmate:jar:1.1.0:compile 
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.6:compile 
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.6:compile (version managed from 2.6.0) 
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.6.6:compile 
[INFO] +- org.springframework:spring-web:jar:4.2.6.RELEASE:compile 
[INFO] | +- (org.springframework:spring-aop:jar:4.2.6.RELEASE:compile - omitted for duplicate) 
[INFO] | +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] | +- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.2.5.RELEASE; omitted for duplicate) 
[INFO] | \- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO] \- org.springframework:spring-webmvc:jar:4.2.6.RELEASE:compile 
[INFO]  +- (org.springframework:spring-beans:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO]  +- (org.springframework:spring-context:jar:4.2.6.RELEASE:compile - version managed from 4.2.5.RELEASE; omitted for duplicate) 
[INFO]  +- (org.springframework:spring-core:jar:4.2.6.RELEASE:compile - version managed from 4.1.9.RELEASE; omitted for duplicate) 
[INFO]  +- (org.springframework:spring-expression:jar:4.2.6.RELEASE:compile - omitted for duplicate) 
[INFO]  \- (org.springframework:spring-web:jar:4.2.6.RELEASE:compile - omitted for duplicate) 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 3.367 s 
[INFO] Finished at: 2016-06-09T22:07:03+02:00 
[INFO] Final Memory: 21M/339M 
[INFO] ------------------------------------------------------------------------ 
+0

请分享您的依赖关系树 – Luanne

回答

1

春数据共享的版本是问题。如果你坚持使用SDN 4.1.1所属的发布版本(Hopper SR1),那么你应该没问题。

This告诉您如何做到这一点:

<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.data</groupId> 
      <artifactId>spring-data-releasetrain</artifactId> 
      <version>Hopper-SR1</version> 
      <type>pom</type> 
      <scope>import</scope> 
     </dependency> 
    </dependencies> 
</dependencyManagement>