

Spring Framework 6 and Spring Boot 3 Released
source link: https://blog.adamgamboa.dev/spring-framework-6-and-spring-boot-3-released/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Spring Framework 6 and Spring Boot 3 Released – Adam Gamboa G – DeveloperSkip to content
Full Stack notes and tips for developers… Java, React, Kubernetes, Scala, and more…
A new generation of Spring Framework has been released, after 5 years with Spring Framework 5.x, in November 2022, Spring Framework 6 has been released. And with it, Spring Boot has a new major version available, Spring Boot 3.
Now the question is: What’s new on these new versions? There are several new features, some other deprecated features have been removed. But there are 4 main features on these released versions.
- Java 17 is the baseline
- Support to Jakarta EE 9 and 10 specifications and packages.
- Observability improved with Micrometer
- Native compilation using GraalVM
Java 17 baseline
Even though previous version of Spring Framework and Spring Boot had support to run on Java 17, the base line is not the latest LTS version. For these releases the internally compile the libraries and uses many of the new features provided in Java 17. It means that you will need to migrate also your base line code to Java 17 to start using Spring Framework 6 or Spring Boot 3.
Jakarta EE Support
Spring Framework uses some the Java EE specifications, for example, for Servlets, JPA, or support CDI annotations. When Java EE moves to the eclipse foundation and change the name to Jakarta EE, those specification also had to change the packages from javax.*
to jakarta.*
. Therefore import like javax.servlet.http.HttpServletRequest
now are jakarta.servlet.http.HttpServletRequest
.
Observability
With Spring 6, there was an Observability initiative that ended up with a new Micrometer Observation API and with the former Spring Cloud Sleuth project migrated to Micrometer Tracing. This is more for efficiently recording application metrics with Micrometer, and implementing tracing through providers, such as OpenZipkin or OpenTelemetry.
There’s auto-configuration for all of these in Spring Boot 3, and the Spring projects are working on instrumenting themselves using the Observation API.
Native Compilation
This feature is a response to new frameworks like Quarkus and Micronaut, which have been gaining popularity because of the lower resource usage. Now, we can generate native code without third party plugins or addons. Just by running mvn springboot:aot-generate
References
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK