oktadev / native-java-examples

Native Java Apps with Micronaut, Quarkus, and Spring Boot
https://developer.okta.com/blog/2021/06/18/native-java-framework-comparison
Apache License 2.0
61 stars 33 forks source link

Guidance for Spring Boot 3.0 GA update #60

Open sdeleuze opened 2 years ago

sdeleuze commented 2 years ago

Hey @mraible,

As we are about to release Spring Boot 3.0 GA, I would like to share some feedback on the Spring Boot 3 sample.

For an optimized footprint, I still recommend using the tomcat-embed-programmatic artifact with Spring Boot 3 that I contributed via https://github.com/oktadev/native-java-examples/pull/12, any chance you could you restore this optimization and related documentation in your next run? That will also avoid you to be impacted by https://github.com/apache/tomcat/pull/569 expected to be fixed only in Tomcat 10.1.3 (to be probably shipped with Spring Boot 3.0.1)

This additional Buildpacks configuration is not needed anymore.

We discovered a huge memory consumption issue in Jackson 2.14, it should be fixed in Spring Boot 3 GA via https://github.com/FasterXML/jackson-databind/issues/3665. We did also several optimizations in Spring Framework 6.0.1 which will be used in Spring Boot 3 GA.

This one has a smaller impact, but you can change @SpringBootApplication to @SpringBootApplication(proxyBeanMethods = false) since that will totally skip proxies even if they are now created at build-time. https://github.com/oktadev/native-java-examples/blob/main/spring-boot/src/main/java/com/okta/rest/Application.java#L6

Spring Boot 3 GA should be released this Thursday, Nov 24th.

mraible commented 1 year ago

Thank you for this advice @sdeleuze! If you'd like to create a PR for the spring-boot app, I'd be happy to review.