解决分层打包后,报Could not find or load main class org.springframework.boot.loader.JarLauncher错误
发现问题
升级到springboot 3.2 后,之前的分层打包启动后会报一下错误
Error: Could not find or load main class org.springframework.boot.loader.JarLauncher
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.loader.JarLauncher
经Google搜索发现之前的org.springframework.boot.loader.JarLauncher
已经被弃用, 需要修改对应的配置
Spring-Boot-3.2-Release-Notes#nested-jar-support
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#nested-jar-support
相关问题 Relocate launcher classes to 'org.springframework.boot.loader.launch' package #37667
Error: Could not find or load main class org.springframework.boot.loader.PropertiesLauncher #38775
修改相关配置
-
修改
docker-entrypoint.sh
修改前
修改后
-
修改maven打包配置
修改前
修改后
- springframework JarLauncher 错误 loader Couldspringframework jarlauncher错误loader springframework jarfile loader memory autowire错误could beans jarlauncher boot springframework错误 程序 could resolve error could proxy missingspecerror create could among deployment servers hbase could resource could from pool