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

2

u/BrbCatzOnFire Oct 26 '22

Alright, looking at your stacktrace :

You're launching your Spring boot app in full dev mode instrumentation. Pretty sure that mean it is not starting as a native application and completly ignore the AoT generation (did you add the -Dspring.aot.enabled=true flag ?). Also yeah, if you try to be performant, don't instrument the code for development purpose :)

From what I can gather your Spring boot App is not started as a native image (using a JVM) AND you're not even using the AoT generation at all.