This document discusses new features and capabilities in Spring Boot 3 and beyond, including support for JDK 17 and Jakarta EE 9/10, ahead-of-time compilation, virtual threads, improved observability, and more. Spring Boot 3.1 RC1 has been released with features like using Testcontainers for development, building Docker images, and dependency upgrades. The speaker demonstrated Spring Boot 3 and discussed upcoming releases of Spring Framework 6.0 and 6.1 as foundations for new Spring Boot versions.
2. ● Husband & Father
● Cleveland
● Software Developer 22+ Years
● Spring Developer Advocate
● Content Creator (www.danvega.dev)
○ Blogger
○ YouTuber
○ Course Creator
● @therealdanvega
About Dan Vega
3.
4. ● JDK 17+
● Jakarta EE 9 / 10 (jakarta namespace)
● AOT (Ahead-Of-Time)
● Virtual Threads (“Project Loom”)
● Observability (Micrometer)
● But wait, there's more!
● Spring Boot 3.1+
● Spring Boot 3 Demo
A new generation of Spring for 2023 and beyond
7. Baseline: JDK 17 LTS
Language: text blocks, switch expressions
Core libraries: collection factory methods, etc
Type system: records, sealed classes
Module system: module introspection, module path scanning
Performance Improvements
Security Updates
Empowering the framework as well as applications
8. JDK 17 / 20 / 21
Spring generally embraces the latest JDK/JVM versions
JDK 17 baseline retained for long-term support purposes
E.g. in JDK 20: virtual threads, record patterns (preview)
JDK 21 on the horizon as next long-term support release
Consider upgrading your JDK along with Spring Framework 6.x
9. Baseline: Jakarta EE 9
A new namespace: Java EE 8 → Jakarta EE 9
Servlet API 5.0 : javax.servlet → jakarta.servlet
JPA 3.0 : javax.persistence → jakarta.persistence
Bean Validation 3.0 : javax.validation → jakarta.validation
Dependency Injection 2.0 : javax.inject → jakarta.inject
All further API evolution to happen in jakarta namespace
10.
11. Jakarta EE 9 / 10
Tomcat 10.0 / 10.1 – Servlet API 5.0 / 6.0
Jetty 11 / 12 – Servlet API 5.0 / 6.0
Undertow 2.3 – Servlet API 6.0
Hibernate ORM 6.1 – JPA 3.0 / 3.1
Hibernate Validator 7.0 / 8.0 – Bean Validation 3.0
Note: API upgrades not coupled to major provider versions anymore!
12. Jakarta EE 10 preferred
Spring Framework 6.0 auto-detects EE 10 APIs at runtime
E.g. using EE 10’s WebSocket protocol upgrade API
Spring Boot 3.0 effectively ships EE 10 APIs and providers
One exception: Jetty 11, since Jetty 12 is not final yet
Note: Spring’s Servlet mocks are Servlet 6.0 (EE 10) based
14. Spring AOT
Reducing startup time and memory footprint in production
Runtime hints for reflection, resources, serialization, proxies
Optional for optimized JVM deployments
Precondition for GraalVM native executables
AOT is a tradeoff: extra build setup and less flexibility at runtime
15. GraalVM Native Image
GraalVM as the de-facto standard for native executables
Strong closed-world assumption, no runtime adaptations
AOT-processed application as input → native executable
Very long build time for actual native code generation
A different mode of deployment with strong benefits and limitations
22. Virtual Threads versus Reactive Programming
Virtual threads provide a different scalability mechanism
Traditional imperative programming style, revisited
Empowering Spring MVC to reach a new level of scalability
Spring WebFlux as an architecture for stream-based processing
Reactive: stream-based style, not primarily for scalability (anymore)
23. Embracing Virtual Threads
Higher scalability needed for Servlet deployments
Or same concurrency but with a smaller footprint
Best possible use of available CPU resources
Virtual threads supported in GraalVM Native Image as well
High expectations in the community
25. Observability
Observability is the ability to observe the internal state of a running system from
the outside. It consists of the three pillars logging, metrics and traces.
Direct Observability instrumentation with Micrometer Observation in several parts
of the Spring Framework.
RestTemplate and WebClient are instrumented to produce HTTP client request
observations.
Spring Cloud Sleuth no longer needed for Distributed Tracing
28. Spring Boot 3
HTTP Interface Client
RFC 7807 Problem Details
Spring Data 2022
Spring Security 6
Spring Authorization Server 1.0
Spring for GraphQL 1.1
More
30. Spring Boot 3.1.0 RC 1
Using Testcontainers at Development Time
Docker Compose spring-boot-docker-compose module
Building Docker Images with Maven or Gradle
Dependency Upgrades
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.1.0-RC1-Release-Notes
32. Spring Framework 6.0 – available now
Foundation for Spring Boot 3.0 & 3.1
Production-ready on JDK 17 LTS
Regular stream of 6.0.x releases in 2023
33. Spring Framework 6.1 – November 2023
Foundation for Spring Boot 3.2 & 3.3
Production-ready on JDK 17 & 21 LTS
Release candidate expected in September 2023
34. Thank you 🙏
Dan Vega
Spring Developer Advocate
dvega@vmware.com