很可能是多个三方依赖重复了,依赖个插件,这个插件能查找出依赖关系,
duplicate-finder-maven-plugin
使用命令显示
mvn dependency:tree
[INFO] - org.springframework.cloud:spring-cloud-bus:jar:2.0.0.RELEASE:compile [INFO] +- org.springframework.cloud:spring-cloud-stream:jar:2.0.1.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.0.4.RELEASE:compile [INFO] | +- org.springframework:spring-messaging:jar:5.0.8.RELEASE:compile [INFO] | +- org.springframework:spring-tuple:jar:1.0.0.RELEASE:compile [INFO] | | - com.esotericsoftware:kryo-shaded:jar:3.0.3:compile [INFO] | | - com.esotericsoftware:minlog:jar:1.3.0:compile [INFO] | +- org.springframework.integration:spring-integration-tuple:jar:1.0.0.RELEASE:compile [INFO] | - org.springframework.retry:spring-retry:jar:1.2.2.RELEASE:compile [INFO] - org.springframework.integration:spring-integration-core:jar:5.0.7.RELEASE:compile [INFO] - io.projectreactor:reactor-core:jar:3.1.8.RELEASE:compile [INFO] - org.reactivestreams:reactive-streams:jar:1.0.2:compile
可以清楚看出依赖关系,
然后在导入依赖的地方exclusion掉名字重复,没在用的就行.