Spring Boot 3
Java 17 Baseline and Java 19 Support
Spring Boot 3.0 requires Java 17 as a minimum version. If you are currently using Java 8 or Java 11, you’ll need to upgrade your JDK before you can develop Spring Boot 3.0 applications.
Spring Boot 3.0 also works well and has been tested with JDK 19.
GraalVM Native Image Support
Spring Boot 3.0 applications can now be converted into GraalVM native images which can provide significant memory and startup-up performance improvements.
Spring Framework 6
JDK 17+ and Jakarta EE 9+ Baseline
- The entire framework codebase is based on Java 17 source code level now.
- Migration from
javax
tojakarta
namespace for Servlet, JPA, etc.
import javax.servlet.http.HttpServletRequest;
with
import jakarta.servlet.http.HttpServletRequest;
- Runtime compatibility with Jakarta EE 9 as well as Jakarta EE 10 APIs.
- Compatible with the latest web servers: Tomcat 10.1, Jetty 11, Undertow 2.3.
- Early compatibility with virtual threads (in preview as of JDK 19).
Spring MVC
PathPatternParser
used by default (with the ability to opt intoPathMatcher
).- Removal of outdated Tiles and FreeMarker JSP support.
Declarative HTTP Client
Interface-based, similar to Spring Cloud Feign
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.
Migrating Project to Spring Boot 3
There are a few hints for project migration that we should know. The recommended steps are:
- Migrate to Spring Boot 2.7
- Check for deprecated code usage and legacy config file processing; it will be removed with the new major release
- Migrate to Java 17.
- Check third-party projects to have Jakarta EE 9 compatible releases