GraalVM code reachability algorithm is not able to evaluate at build
time that ENABLED static field is always false in a native image,
shipping unreachable code.
Before this commit, building a native image with -H:+PrintAnalysisCallTree
shows that the following methods are included:
- BackgroundPreinitializer$1.<init>(BackgroundPreinitializer):void
- BackgroundPreinitializer$1.run():void
- BackgroundPreinitializer$1.runSafely(Runnable):void
- BackgroundPreinitializer$CharsetInitializer.run():void
- BackgroundPreinitializer$ConversionServiceInitializer.run():void
- BackgroundPreinitializer$JacksonInitializer.run():void
- BackgroundPreinitializer$MessageConverterInitializer.run():void
- BackgroundPreinitializer$ValidationInitializer.run():void
- BackgroundPreinitializer.<clinit>():void
- BackgroundPreinitializer.getOrder():int
- BackgroundPreinitializer.onApplicationEvent(ApplicationEvent):void
- BackgroundPreinitializer.onApplicationEvent(SpringApplicationEvent):void
- BackgroundPreinitializer.performPreinitialization():void
After this commit, only those are included:
- BackgroundPreinitializer.<clinit>():void
- BackgroundPreinitializer.getOrder():int
- BackgroundPreinitializer.onApplicationEvent(ApplicationEvent):void
- BackgroundPreinitializer.onApplicationEvent(SpringApplicationEvent):void
See gh-33240
SharedMetadataReaderFactoryContextInitializer exposes an additional
bean post processor that is only relevant when parsing the bean
factory, auto-configurations in particular. Given that this does not
happen in an AOT-optimized context, this commit excludes the bean
and makes sure the initializer does not do anything at runtime.
Closes gh-33216
AllEncompassingFormHttpMessageConverter already initializes
Jackson ObjectMapper. This commit updates BackgroundPreinitializer
in order to not run JacksonInitializer when
MessageConverterInitializer already takes care of initializing
ObjectMapper.
See gh-33220
This commit ensures that the default locations for GraphQL schema files
and the GraphiQL UI HTML page are included in the native image by
registering resource hints during the AOT phase.
Fixes gh-33208
Spring Integration has introduced a new observationPatterns attribute
on EnableIntegrationManagement. Spring Boot auto-configures
EnableIntegrationManagement so this commit adds a property that
allows users to configure the patterns without declaring the
annotation themselves.
See gh-33099
Commit 29f085bd1a690ff7281e00b3a925e1160850ffbb in Spring Framework
automatically registers hints for enclosing directories. This fixes the
tests to use a contains instead of exact match.
Commit 29f085bd1a690ff7281e00b3a925e1160850ffbb in Spring Framework
automatically registers hints for enclosing directories. This fixes the
tests to expect hints for those directories as well.