不要微信中发送spring boot的jar包

Exception in thread "main" java.lang.IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/spring-boot-2.4.6.jar
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:120)
        at org.springframework.boot.loader.archive.JarFileArchive$NestedArchiveIterator.adapt(JarFileArchive.java:274)
        at org.springframework.boot.loader.archive.JarFileArchive$NestedArchiveIterator.adapt(JarFileArchive.java:265)
        at org.springframework.boot.loader.archive.JarFileArchive$AbstractIterator.next(JarFileArchive.java:226)
        at org.springframework.boot.loader.ExecutableArchiveLauncher.createClassLoader(ExecutableArchiveLauncher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:55)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/spring-boot-2.4.6.jar'
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:288)
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:274)
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:116)
        ... 6 more
Caused by: java.io.IOException: Unable to find ZIP central directory records after reading 65792 bytes
        at org.springframework.boot.loader.jar.CentralDirectoryEndRecord.<init>(CentralDirectoryEndRecord.java:70)
        at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(CentralDirectoryParser.java:51)
        at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:137)
        at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:123)
        at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:319)
        at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:296)
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:285)
        ... 8 more

微信中传递了spring boot的jar 包,部署到环境中出现这个问题。

解决方法

重新打包之后不经过微信就可以解决了,是因为缺少包。

你可能感兴趣的:(spring,boot,jar,后端)