What's New in Spring Boot 3
Spring Boot 3 ships with Java 17 baseline, native AOT compilation, and major security upgrades. Here's everything you need to know before migrating.
Spring Boot 3 is the most significant release in years. Here's what changed and why it matters.
Java 17 baseline
Spring Boot 3 drops support for Java 8 and 11. The minimum is now Java 17, which means records, sealed classes, and text blocks are first-class citizens throughout your application.
GraalVM Native Image support
For the first time, Spring Boot applications can be compiled to a native binary using GraalVM. The result: startup in milliseconds and drastically lower memory usage β ideal for serverless and container workloads.
./mvnw -Pnative native:compile
java -jar target/myapp # starts in < 100ms
Observability with Micrometer Tracing
Spring Boot 3 ships Micrometer Tracing as a first-class citizen. Distributed traces flow automatically through RestClient, WebClient, and Spring MVC.
management:
tracing:
sampling:
probability: 1.0
zipkin:
tracing:
endpoint: http://localhost:9411/api/v2/spans
New RestClient (replaces RestTemplate)
RestClient client = RestClient.create("http://api.example.com");
String body = client.get()
.uri("/users/{id}", 1)
.retrieve()
.body(String.class);
Migrating from Spring Boot 2
The main breaking changes:
javax.*βjakarta.*package rename (most significant change)- Spring Security's
WebSecurityConfigurerAdapteris removed β useSecurityFilterChainbeans instead spring.redis.*properties renamed tospring.data.redis.*
Related Posts
Resilient Microservices: Timeouts, Retries and Circuit Breakers Done Right
One slow dependency can take down a whole system. How timeouts, retries with backoff, circuit breakers and bulkheads work together β with Resilience4j examples for Spring Boot.
@Transactional Pitfalls: 7 Ways Your Spring Transaction Silently Doesn't Work
Self-invocation, checked exceptions, private methods, swallowed exceptions and more β the common reasons @Transactional does nothing or doesn't roll back, and how to fix each one.
Dependency Injection Explained (and Why Spring Gets It Right)
DI is one of the most misunderstood patterns in software. Here's a clear explanation β from the problem it solves to how Spring's IoC container works under the hood.