java.lang.NoSuchMethodError:org.springframework.util.ReflectionUtils.clearCache()V

时间:2018-02-26 19:14:21

标签: java maven spring-boot

我收到了上述错误。谷歌搜索后,我才知道问题在于依赖关系。所以我运行了mvn dependency:tree命令并获得了以下输出 -

  

INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dubbo-test --- [INFO] com.privacera.dubbo:dubbo-test:jar:1.0-SNAPSHOT [INFO] +- com.alibaba.boot:dubbo-spring-boot-starter:jar:1.0.0-SNAPSHOT:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.3.0.RELEASE:true [INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.0.RELEASE:runtime [INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.3:runtime [INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.3:runtime [INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.13:runtime [INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.13:runtime [INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.13:runtime [INFO] | | +- org.springframework:spring-core:jar:4.2.3.RELEASE:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.16:runtime [INFO] | +- com.alibaba:dubbo:jar:2.5.9:compile [INFO] | | +- org.springframework:spring-context:jar:4.3.10.RELEASE:compile [INFO] | | | +- org.springframework:spring-aop:jar:4.3.10.RELEASE:compile [INFO] | | | \- org.springframework:spring-expression:jar:4.3.10.RELEASE:compile [INFO] | | +- org.springframework:spring-beans:jar:4.3.10.RELEASE:compile [INFO] | | +- org.springframework:spring-web:jar:4.3.10.RELEASE:compile [INFO] | | +- org.javassist:javassist:jar:3.20.0-GA:compile [INFO] | | \- org.jboss.netty:netty:jar:3.2.5.Final:compile [INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.9:compile [INFO] | | +- org.slf4j:slf4j-api:jar:1.6.1:compile [INFO] | | +- log4j:log4j:jar:1.2.16:compile [INFO] | | +- jline:jline:jar:0.9.94:compile [INFO] | | \- io.netty:netty:jar:3.10.5.Final:compile [INFO] | +- org.apache.curator:curator-framework:jar:2.12.0:compile [INFO] | | \- org.apache.curator:curator-client:jar:2.12.0:compile [INFO] | | \- com.google.guava:guava:jar:16.0.1:compile [INFO] | +- com.alibaba.boot:dubbo-spring-boot-autoconfigure:jar:1.0.0-SNAPSHOT:compile [INFO] | \- com.alibaba.boot:dubbo-spring-boot-actuator:jar:1.0.0-SNAPSHOT:compile [INFO] \- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.3.RELEASE:compile [INFO] \- org.springframework.boot:spring-boot:jar:1.3.3.RELEASE:compile

但我无法理解哪个依赖项存在冲突。以下是我的pom.xml的内容

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.vector.dubbo</groupId>
    <artifactId>dubbo-test</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>1.3.3.RELEASE</version>
        </dependency>


    </dependencies>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>

0 个答案:

没有答案