java - 将a.class文件添加到war文件中的库jar文件中
问题描述
将 .class 文件添加到现有的 war/jar 文件后,原始的 war/jar 文件将被删除
Exception in thread "main" java.lang.IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/vsoft-cts-dem-model-1.2.0.jar
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:108)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:86)
at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:70)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/vsoft-cts-dem-model-1.2.0.jar'
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:254)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:239)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:103)
... 4 more
Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/vsoft-cts-dem-model-1.2.0.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:282)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:262)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:250)
... 6 more
解决方案
推荐阅读
- spring-boot - 带有秘密的 livenessProbe 在 Kubernetes 中不起作用
- java - Spring Security - 获取凭证返回 null
- c# - Unity - 编辑器自动刷新对象列表的 InvalidCastException(之前有效)
- c++ - 我在 .h 中有一个枚举类,在 .cpp 错误中有运算符重载:'operator<<' 不匹配
- google-apps-script - Google Apps 脚本 setFormulasR1C1 给出公式解析错误
- c# - GET 请求不通过
- python - 如何使用 BeautifulSoup 从期刊版本列表中抓取 pdf 网址?
- r - R中带有aov对象的独立t检验
- android - 在 android 应用程序 kotlin 上对图像进行精明的边缘检测
- css - 动画迭代计数无限在 Safari 上不起作用