Add info log message if AOT mode is enabled

Closes gh-32396
This commit is contained in:
Moritz Halbritter 2022-10-17 15:28:08 +02:00
parent 4700a00d94
commit 6cb7fb5897
1 changed files with 10 additions and 0 deletions

View File

@ -385,6 +385,7 @@ public class SpringApplication {
if (this.logStartupInfo) {
logStartupInfo(context.getParent() == null);
logStartupProfileInfo(context);
logStartupAotMode();
}
// Add boot specific singleton beans
ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
@ -640,6 +641,15 @@ public class SpringApplication {
}
}
/**
* Called to log the AOT mode.
*/
protected void logStartupAotMode() {
if (AotDetector.useGeneratedArtifacts()) {
logger.info("AOT mode enabled");
}
}
private List<String> quoteProfiles(String[] profiles) {
return Arrays.stream(profiles).map((profile) -> "\"" + profile + "\"").toList();
}