依赖项要求的库版本与要使用的库版本之间可能存在不兼容的差异。如果您乐于冒险,可以使用maven
exclusions忽略传递依赖。
您可以排除,例如,
spring-core被带到通过
PartialKernel加入:
<dependency> <groupId>com.texture.partial.core</groupId> <artifactId>PartialKernel</artifactId> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> </exclusion> </exclusions></dependency>
请注意,您必须为引入Spring依赖项的每个依赖项执行此操作。
现在
spring-core,在顶级pom
依赖性管理部分中定义要使用的版本:
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.1.6.RELEASE</version> </dependency> </dependencies></dependencyManagement>



