Spring Boot 2.7 Release Notes
Spring Boot 2.7.0, released on January 19, 2022, is the final feature release of the 2.7 line, incorporating Spring Framework 5.3.16 and focusing on stability, security, and minor enhancements. This version requires Java 8 or later, with support up to Java 17, and aligns with Jakarta EE 8 for servlet and JPA APIs. It includes over 100 improvements, bug fixes, and dependency upgrades, marking the end of active feature development for the 2.x series.
Spring Boot 2.7 emphasizes backward compatibility with earlier 2.x releases while preparing for the transition to 3.x. It suits legacy applications, microservices, and enterprise systems, with maintenance support extended until November 2024.
New Features
Added support for graceful shutdown in reactive web servers using WebServerFactoryCustomizer. The spring.config.activate.on-cloud-platform property detects cloud environments like Kubernetes.
New auto-configuration for RSocket messaging with reactive security. DevTools now supports remote applications with live reload over WebSockets.
Performance Improvements
Optimized startup time by lazy-loading optional dependencies. Caching abstractions use Caffeine as the preferred provider for better concurrency.
HTTP client integrations with Apache HttpClient and OkHttp benefit from connection pooling tweaks, reducing latency in high-throughput scenarios.
Security Updates
Spring Security 5.5.7 integration addresses CVEs, including session fixation and OAuth2 token handling. Default CSRF protection is strengthened with improved token storage.
Actuator endpoints now support role-based access by default, and vulnerability detection in dependencies is enhanced via the Maven and Gradle plugins.
Auto-Configuration Enhancements
Improved detection for multiple data sources with @EnableJpaRepositories. GraphQL auto-configuration supports schema stitching and federation.
Kafka Streams integration adds health indicators for consumer groups and topic offsets.
DevTools and Testing
Enhanced restart classloader excludes for faster development cycles. Testing support includes @MockBean improvements for reactive types.
New @SpringBootTest properties for web environment simulation and randomized ports.
Build and Packaging
Maven and Gradle plugins add layered JAR support for Docker images. Native image builds with GraalVM are optimized with reachability metadata.
Executable JARs now include better shebang handling for Unix scripts.
Dependency Upgrades
| Dependency | Version |
|---|---|
| Spring Framework | 5.3.16 |
| Spring Security | 5.5.7 |
| Spring Data BOM | 2021.2.0 |
| Hibernate | 5.6.9.Final |
| Jackson | 2.13.3 |
| Tomcat | 9.0.62 |
| Jetty | 9.4.44.v20210924 |
| Micrometer | 1.9.12 |
| Kafka | 3.0.0 |
| Flyway | 8.4.4 |
Deprecations
Deprecated spring.main.allow-bean-definition-overriding in favor of explicit overrides. Legacy WebMvcConfigurer adapters are phased out.
Support for XML-based configurations is deprecated; migrate to annotation-driven approaches.
Removals
Removed support for Spring Framework 5.2.x. The spring-boot-starter-websocket no longer includes deprecated SockJS fallbacks.
Old actuator management contexts are removed.
Migration and Support
Upgrading from 2.6 uses spring-boot-migrator tool for dependency and property updates. Test for security and performance changes.
Spring Boot 2.7 receives maintenance until November 2024. Prepare for 3.x migration with Jakarta EE updates.