Closed hjellek closed 10 months ago
Good suggestion, thanks! Should be pretty easy to add.
🔔 we just hit a limitation of this new feature internally. Coincidentally, we had a work item to migrate a Spring Boot app from Maven to Bazel, and we just started doing it and found it happens to need this boot-launcher-class feature.
BUT, the app has written a custom launcher, not one of the ones from Spring Boot. This surfaced an issue. This feature assumes that the launcher class is written into the root of the springboot jar, not in BOOT-INF/lib.
tar -tvf myspringboot.jar
...
com/salesforce/boot/MyCustomJarLauncher.class
...
We will work on a solution to support custom launchers in #129
I’m using Spring Boot 3 and I also ran into this issue. Hope it could be fixed soon in #129. Thanks!
@luangong release 2.3.1 should have the fix you need. You will need to set the new boot_launcher_class attribute.
# use the spring boot 3 launcher
boot_launcher_class = 'org.springframework.boot.loader.launch.JarLauncher',
Specifying the new JarLauncher
via the boot_launcher_class
attribute works. Thanks!
In Spring Boot 3.2.0 a new
org.springframework.boot.loader.launch.JarLauncher
has been introduced.Currently the old loader is hardcoded in write_manifest.sh and springboot_pkg.sh.
This should be open for overriding, or automatically switch between the loaders based on detected Spring Boot version.
As a workaround, one can include spring-boot-loader-classic in the application dependencies to get the old JarLauncher.