While trying to reduce Spring Boot (1.5.4) startup time, I removed the @SpringBootApplication annotation from my application class, resulting in the following:
public class WebApplication {
public static void main(String[] args) {
System.out.println("Starting spring boot");
SpringApplication.run(WebApplication.class, args);
}
}
So, essentially, this isn't doing anything useful anymore (as no components will be registered etc.) Starting this on a 2017 MBP still takes around 10 seconds between the println and the Spring Boot banner (which I believe is pre-configuration even). Starting an app of another framework is instantaneous. Where is all this time spent? Is there anything that can be done to reduce this time?
There are multiple questions on SO about minimising Spring Boot startup time, but as far as I can tell, the proposed solutions reduce the time spent after the Spring Boot banner shows (component scanning, auto-configuration, ...).