You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before, a spring boot application that used PropertiesLauncher (archived by spring boot maven plugin with ZIP layout) can load a resource via the url just like "jar:file:/var/lib/application.jar!/BOOT-INF/classes!/application.yml" returned by Application.class.getResource("/application.yml") .
Since upgrade to spring-boot v2.3.0, it doesn't work any more, dig in code, finding is:
In Launcher.java, The spring-boot url protocol handler is registered only if is exploded, and isExploded() return true by default.
and PropertiesLauncher inherit Launcher without overriding isExploded(), so the application fail to load in non-exploded mode.
Is that on purpose? Does not PropertiesLauncher support non-exploded mode in v2.3.0? Or maybe similar to ExecutableArchiveLauncher, PropertiesLauncher should override isExploded() and return true or false based on archive is exploded or not.
@jianshaow Thanks for the report. I think this was an accidental change in behaviour. PropertiesLauncher should still support being run from an archive (non-exploded) in 2.3.
philwebb
changed the title
PropertiesLauncher cannot load a resource in jar via URL since v2.3.0
PropertiesLauncher cannot load a resource in jar via URL
Jun 6, 2020
Before, a spring boot application that used
PropertiesLauncher
(archived by spring boot maven plugin with ZIP layout) can load a resource via the url just like "jar:file:/var/lib/application.jar!/BOOT-INF/classes!/application.yml" returned byApplication.class.getResource("/application.yml")
.Since upgrade to spring-boot v2.3.0, it doesn't work any more, dig in code, finding is:
In Launcher.java, The spring-boot url protocol handler is registered only if is exploded, and isExploded() return true by default.
and PropertiesLauncher inherit Launcher without overriding isExploded(), so the application fail to load in non-exploded mode.
Is that on purpose? Does not PropertiesLauncher support non-exploded mode in v2.3.0? Or maybe similar to ExecutableArchiveLauncher, PropertiesLauncher should override isExploded() and return true or false based on archive is exploded or not.
The text was updated successfully, but these errors were encountered: