看来,你有你的build.gradle
是这样的:
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework:spring-jdbc:4.1.4.RELEASE'
compile 'org.springframework.security:spring-security-taglibs:4.0.4.RELEASE'
}
所以这引入了您的依赖关系的冲突,可见在下面的输出任务:
gradle dependencyInsight --dependency org.springframework:spring-jdbc
:dependencyInsight
org.springframework:spring-jdbc:4.2.5.RELEASE (conflict resolution)
\--- org.springframework.security:spring-security-acl:4.0.4.RELEASE
\--- org.springframework.security:spring-security-taglibs:4.0.4.RELEASE
\--- compile
org.springframework:spring-jdbc:4.1.4.RELEASE -> 4.2.5.RELEASE
\--- compile
上方的箭头( - >)指的是使用的gradle默认分辨率策略和4.2.5(最新)通过选择gradle这个。您可以在文档的gradle阅读:
摇篮提供了以下冲突解决策略:
最新:使用依赖的最新版本。这是Gradle的默认策略,因为版本向后兼容,所以只要长期为 就是一个合适的选择。
失败:版本冲突导致构建失败。该策略要求在构建 脚本中明确解决所有版本冲突。
Link.
我所看到的选项供您:
- 使用最新
spring-jdbc
(最好IMO)
- 使用的dependes对老年人春季安全标签库年长
spring-jdbc
- 解决你的脚本中的版本冲突(最差的IMO),并保持你的手指交叉。您至少需要一些运气:-)详细信息 - here
添加您的'build.gradle' –