SpringBoot项目替换内部的依赖jar包


注意: 不能用winrar或7zip等普通解压软件鼠标拖入直接替换, 否则启动报错: 
Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/**.jar'. It has been compressed and nested jar files must be stored without compression. (嵌套的jar必须直接存储, 而不能压缩) Please check the mechanism used to create your executable jar file
解决方法1: jar命令解压, 替换后进行压缩(参考: https://www.cnblogs.com/zhjh256/p/10986920.html) jar -xvf ./*.jar jar -cfM0 *.jar ./ 解决方法2: winrar或7zip添加文件的时候, 将选择压缩方式由"标准"改为存储(Store) (参考: https://www.jianshu.com/p/9df4a0bb46be)

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM