diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index d546feb577a..6043c965f91 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -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 quoteProfiles(String[] profiles) { return Arrays.stream(profiles).map((profile) -> "\"" + profile + "\"").toList(); }