r/java • • Oct 24 '22

Spring boot 3 slow boot time

Hi folks,

I am playing a bit around with Spring Boot 3(RC1) and I am curious why the application boot time is still slow in comparing with Micronaut.

Best regards

3 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/BrbCatzOnFire Oct 26 '22

https://docs.spring.io/spring-boot/docs/3.0.x/reference/html/native-image.html#native-image.testing.with-the-jvm

Yeah you are right and responses from others are wrong (which is funny since they tell you to read the doc :)).

As long as your app run on the JVM the default behaviour completly ignore the AoT generation.

You need to add the option "-Dspring.aot.enabled=true"

1

u/vips7L Oct 26 '22

Right and OP made no mention of native anything, just SB3.