目录
一、报错
Caused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/xxxx-0.0.1-SNAPSHOT.jar'
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:261)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:247)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:109)
... 4 more
Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/xxxx-0.0.1-SNAPSHOT.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file
at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:287)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:269)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:258)
... 6 more
Socket error Event: 32 Error: 10053.
Connection closing...Socket close.
二 、处理方案
2.1方案一:
2.1.1解压jar文件
jar -xvf ./*.jar
jar -xf jar文件
2.1.2修改解压后后的文件
2.1.3 重新打包
jar -cfM0 *.jar ./
2.2方案二:
winrar或7zip添加文件的时候, 将选择压缩方式由"标准"改为存储(Store)
参考链接:如何更新Jar包里的lib/jar包