描述
引用二方包导致应用无法启动,启动抛出SpringAware NotFound
问题定位
发现加了 pom 文件更新了二方包的版本号就导致当前应用起不来,发现应该是pom文件的问题。当前的 pom 除了这个二方包有变动其他都没修改,只能是间接依赖除了问题。
在二方包中添加了一个 jpa 的包
<dependency> <groupId>javax.persistence</groupId> <artifactId>javax.persistence-api</artifactId> <version>2.2</version> </dependency>
这个包导致的冲突,但是并没有发现我的应用中有这个包,不清楚怎么冲突的。
解决方案
在引入二方包的时候 排除了这个包
<dependency> <groupId>com.alibaba.xxx</groupId> <artifactId>xxxx-client</artifactId> <version>1.0.33</version> <exclusions> <exclusion> <groupId>javax.persistence</groupId> <artifactId>javax.persistence-api</artifactId> </exclusion> </exclusions> </dependency>