正在开发一个系统,用的renrenfast2.0(springboot)开源框架,结果编译没问题,打jar包没问题,运行时候出错,报jar包冲突,原因是项目里加入了阿里云短信SDK,没配置好
报错情况:
org.springframework.context.ApplicationContextException: Unable to start web server;
Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcept
Unable to Start embedded TomCat
Java.lang.NoClassDefFoundError:com/aliyuncs/exceptions/ClientException
问题根源:阿里云Jar包配置后,打包插件没配置好,导致打的jar包可能出现重复,故报jar包冲突错误。
正确的做法:除了正常的引入jar包外,还需要在打包插件中配置。
1.正常引入jar包
<!--配置外部jar包依赖-->
<dependency>
<groupId>com.yzm</groupId>
<artifactId>alicom-mns-receive-sdk-1.0.1</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/alicom-mns-receive-sdk-