Spring Framework 6.1 Release Notes
Spring Framework 6.1.0, released on November 16, 2023, introduces significant enhancements in testing, bean management, and observability while maintaining full alignment with Jakarta EE 10 and Java 17+. This version integrates seamlessly with Spring Boot 3.2 and focuses on developer productivity, performance, and modern concurrency patterns. It includes over 300 improvements and fixes, with a strong emphasis on testability and cloud-native readiness.
Spring Framework 6.1 preserves backward compatibility with 6.0 applications but introduces refined APIs for virtual threads, structured logging, and improved AOT processing. It is ideal for reactive and imperative web applications, microservices, and enterprise systems.
Enhanced Testing Support
Introduced @DisplayNameGeneration with ReplaceUnderscores strategy for cleaner test output. Added @EnabledIf and @DisabledIf with SpEL support for conditional test execution.
New JUnitJupiter integration supports parallel test execution by default when using @SpringJUnitConfig.
Virtual Threads Integration
Full support for Java 21 virtual threads via TaskExecutor abstraction. Enable with spring.task.execution.thread-name-prefix=vthread- and spring.threads.virtual.enabled=true.
Automatically applied to @Async methods and Spring MVC controllers when running on Java 21+, offering lightweight concurrency without blocking threads.
Structured Logging
Built-in support for JSON structured logging via StructuredLogEvents. Configure with logging.structured.format.console=json in application.properties.
Integrates with Logstash, ELK, and OpenTelemetry for better observability in distributed systems.
AOT and Native Image Improvements
Enhanced Ahead-of-Time processing with better reflection hints and resource detection. @RegisterReflectionForBinding simplifies native image configuration.
Startup time in GraalVM native images reduced by 15-25% compared to 6.0, with smaller binary sizes.
Bean Management Refinements
Improved @Primary resolution with explicit ordering via @Order. Lazy initialization is now more predictable with @Lazy on @Configuration classes.
New BeanFactoryPostProcessor hooks for fine-grained control during context initialization.
Web and HTTP Client Updates
RestTemplate and WebClient support virtual threads for non-blocking I/O. ServerHttpSecurity adds CSRF protection for HTTP/2 and HTTP/3.
Improved CORS handling with CorsConfigurationSource supporting pattern-based origins.
Observability Enhancements
Micrometer 1.12 integration with auto-configured timers for @Scheduled tasks and HTTP endpoints. OpenTelemetry tracing support via Observation API.
Actuator endpoints expose virtual thread pool metrics and AOT compilation status.
Performance Optimizations
Context refresh is 10% faster due to optimized bean definition parsing. SpEL expressions cache more aggressively.
Reactive streams benefit from backpressure improvements in WebFlux.
Dependency Upgrades
| Dependency | Version |
|---|---|
| Jakarta EE | 10 |
| Micrometer | 1.12 |
| Reactor | 2023.0 |
| Jackson | 2.16 |
| Hibernate | 6.4 |
Deprecations
Deprecated WebMvcConfigurerAdapter; use WebMvcConfigurer interface directly. Legacy XML namespace handlers encouraged to migrate to Java config.
Removals
Removed support for Java 8-16 in baseline; Java 17 is now required. Eliminated deprecated AbstractInterruptibleBatchPreparedStatementSetter.
Migration and Support
Upgrade from 6.0 by updating the Spring BOM and reviewing virtual thread usage. Use spring-boot-migrator for property and annotation updates.
Spring Framework 6.1 follows quarterly releases, with full support until November 2025 and extended security patches to 2027.