場景:tar.gz打包
問題:打包后多余打第三方的依賴包,為可執(zhí)行 jar,java -jar啟動時會出現(xiàn)注解無法識別異常
參考資料
https://blog.csdn.net/zsywangyi/article/details/78319130
https://my.oschina.net/u/1760008/blog/1930072
http://www.reibang.com/p/fac4ee344942
注:資料需要綜合場景腿椎,配合使用
解決方案:
去掉依賴jar
<includes>
?? ? ? ?<groupId>nothing?</groupId>
? ? ? ? <artifactId>nothing</artifactId>
</includes>
去掉打成可執(zhí)行jar. false為打成普通jar
<executable>false</executable>
去掉BOOT-INF文件夾
<skip>true</skip>