Browse Source

Add info log message if AOT mode is enabled

Closes gh-32396
pull/33505/head
Moritz Halbritter 3 years ago
parent
commit
6cb7fb5897
  1. 10
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

10
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

@ -385,6 +385,7 @@ public class SpringApplication { @@ -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 { @@ -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();
}

Loading…
Cancel
Save