What’s New in Spring Boot 3.2? Explore Java 21 Features and Virtual Threads
Spring Boot 3.2, released shortly after Java 21, brings a host of enhancements such as virtual thread support, CRaC checkpoint restore, SSL bundle reloading, improved observability, new RestClient and JdbcClient, Jetty 12, Pulsar, Kafka and RabbitMQ SSL, redesigned nested JAR handling, Docker image build upgrades, and a comprehensive video walkthrough by Josh Long.
Spring Boot 3.2 was officially released today, shortly after Java 21, and includes extensive optimizations for the new JDK.
New Features
The official blog outlines the following highlights:
Support for virtual threads (Project Loom)
Initial support for JVM Checkpoint/Restore (CRaC project)
SSL bundle hot‑reloading
Significant observability improvements
Support for RestClient
Support for JdbcClient
Support for Jetty 12
Apache Pulsar integration
SSL bundle support for Kafka and RabbitMQ
Redesigned nested JAR handling
Docker image build enhancements
For a full list of dependency upgrades, see the Spring Boot 3.2 release notes.
Video Overview
Josh Long’s 80‑minute video provides a hands‑on demonstration of the new capabilities.
[00:16] Spring Boot 3.2 introduces many new features, including virtual threads and Project Loom.
Java 21 is a key component of Spring Boot 3.2.
Java 21 adds sealed types, pattern matching, enhanced switch expressions, and records.
Java 21 is marketed as data‑oriented programming to improve performance of large monoliths.
[10:13] String formatting and multiline variables are now convenient, with new features such as records, sealed types, enhanced switch, and pattern matching (destructuring operators are still in development).
[20:27] Demonstration of a collection that skips duplicates, logs the current thread name, and sleeps for 100 ms, showcasing virtual thread usage.
[30:41] Building a SQL‑connected application using Java 21, Maven, and supporting libraries, including Testcontainers to start Docker images and Spring Boot starter JDBC for PostgreSQL.
[40:57] Declarative interfaces simplify code, providing a cat‑facts endpoint; new JDBC and REST clients can be used, and Project Loom integration offers consistent virtual thread support across layers.
[51:09] The SmartLifeCycle interface in Spring represents typical lifecycle methods, allowing custom start/stop management.
[01:01:23] Generation of unique key‑value pairs via a file and configuration of a self‑signed SSL certificate on port 8443.
[01:11:38] Using Docker Compose to launch a Zipkin instance, adding sampling probability in code, and leveraging AOP annotations to display trace and span IDs for distributed tracing.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
