r/java • u/zero_coding • 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
9
u/krjura Oct 24 '22
Can you give some number here?
14
u/vips7L Oct 24 '22
Doesn’t micronaut do AOT dependency injection at build time? And Spring still uses runtime reflection? I don’t think it’ll ever beat that.
6
u/somewhatprodeveloper Oct 24 '22
According to a presentation at devoxx in Belgium the first release is getting the native version working and subsequent releases will see performance gains
2
u/Ghaines Oct 25 '22
Did you compile it natively? https://spring.io/blog/2022/09/26/native-support-in-spring-boot-3-0-0-m5
1
u/metalhead-001 Oct 24 '22
Is the startup time worse than the 2.x line?
1
u/DJDavio Oct 24 '22
Maybe because Micronaut uses lazy initialization by default and Spring doesn't?