what’s New In Spring Boot 3.0
Spring Boot 3.0 brings several new features and improvements.Here are some of the notable changes:
Baseline Upgrades:
Java 17: Spring Boot 3 now requires Java 17 as the baseline, providing performance improvements, security updates, and new language features.
Support for Jakarta EE 10: Spring Boot 3 migrates from Java EE to Jakarta EE APIs, supporting Jakarta EE 9 and 10. This allows the use of evolving Jakarta APIs.
Native Images with GraalVM:
Spring Boot 3.0 introduces support for GraalVM native images, enabling significant memory and startup performance improvements. It requires GraalVM 22.3 or later and the Native Build Tools Plugin 0.9.17 or later.
Observability:
Spring Boot 3 adds built-in support for distributed tracing, eliminating the need for a library like Spring Cloud Sleuth. It utilizes the Micrometer observation API for logging, metrics, and traces.
Http Interfaces:
Spring Boot 3 introduces the concept of Http Interfaces, allowing the declaration of HTTP services as Java interfaces with annotated methods. A proxy can be generated from the interface to handle HTTP exchanges, simplifying remote access.
Problem Details for HTTP APIs:
Spring Boot 3 supports the “Problem Details for HTTP APIs” specification (RFC 7807), which allows including detailed error responses in the body of REST service errors. This provides more information about the encountered problem.
Dependency Upgrades:
Spring Boot 3 includes upgrades to various dependencies, such as Groovy 4.0, Hibernate 6.1, Hibernate Validator 8.0, Jackson 2.14, Jetty 11, R2DBC 1.0, SLF4J 2.0, Tomcat 10, and Thymeleaf 3.1.0.M2.
These are just a few highlights of the new features and improvements in Spring Boot 3.0.
For a more comprehensive list and detailed information, you can refer to the Spring Boot 3 release notes and the Spring Boot 3.0 Migration Guide.