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
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
When an app is repackaged, Spring Boot adds a layertools that has some entries in spring.factories. The AOT plugin doesn't see those because they're not defined in the classpath anywhere.
Until the AOT plugin is moved to core, we'll probably have to add some special handling for this, see spring-projects/spring-boot#25711
The text was updated successfully, but these errors were encountered:
The problem with the special handling is that org.springframework.boot.jarmode.layertools.LayerToolsJarMode has to be resolved by the TypeSystem before writing the entry in spring factories. This makes sense as we don't want to write some code that refers to a class that is not actually available on the classpath.
Looking at our current approach, writing that for tests won't work as the factories won't compile. Writing it only for the runtime one is hard because:
I don't know how we would determine we're not running in a test to add the entry
The factories wouldn't compile anyway when running such an app outside of a repackaged archive (i.e. in an IDE or via spring-boot:run.
Because we're not using the AOT generated classes anymore by default, the regular code path (looking up spring.factories on the classpath) is used and the layertools are detected properly.
When an app is repackaged, Spring Boot adds a layertools that has some entries in
spring.factories
. The AOT plugin doesn't see those because they're not defined in the classpath anywhere.Until the AOT plugin is moved to core, we'll probably have to add some special handling for this, see spring-projects/spring-boot#25711
The text was updated successfully, but these errors were encountered: