0
votes

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, ...).

1
What do you mean with "I disabled all configuration annotations of the spring boot starter app"? - g00glen00b
Is near instantaneous on my 2017 MBP. Running it from IntelliJ IDEA. - M. Deinum
@M.Deinum Thanks for trying this. The problem must be in my environment then. - Remko

1 Answers

0
votes

Since other people were not experiencing this problem, I assumed the problem was in my environment.

I rebooted my machine, and now everything seems fine. I think there was a problem with my network, and I was hitting timeouts.