Chi*_*may 2 java spring pom.xml maven
pom.xml中依赖项的意义是什么?
我按以下顺序拥有依赖项:
如果我在Spring上随处插入Spring Security依赖项,我会收到错误.例如,如果我在最顶层插入两个依赖项,我会得到此异常(运行前也是编译器错误):
java.lang.NoClassDefFoundError:org/springframework/core/env/EnvironmentCapable
And*_*hev 5
Maven中的依赖顺序无关紧要.
添加Spring Security依赖项之后,您需要删除Spring依赖项,因为Spring Security引用了包含此类的不同版本的Spring.
所以删除Spring依赖应该解决这个问题.
归档时间:
11 年,10 月 前
查看次数:
2112 次
最近记录:
10 年 前