Spring Framework 5.3 Release Notes
Spring Framework 5.3 introduces significant improvements in logging infrastructure, functional bean registration, and enhanced support for Java 14+ features while maintaining compatibility with Java 8 as the baseline. This version aligns with Spring Boot 2.4 and provides better performance, observability, and developer experience through refined APIs and reduced boilerplate.
Spring Framework 5.3 is fully backward compatible with 5.2 applications and emphasizes modern Java constructs, AOT processing readiness, and structured logging for cloud-native environments.
Unified Logging with Commons Logging Bridge
Introduced spring-jcl as the default Commons Logging bridge, automatically redirecting all logging to SLF4J. This eliminates the need for explicit Log4j2 or JUL bridges in most cases.
Applications using Log4j2 or java.util.logging now route through SLF4J without additional configuration, simplifying dependency management and log correlation.
Functional Bean Registration
New GenericApplicationContext API allows programmatic bean registration using lambdas:
context.registerBean(MyService.class, () -> new MyService(beanA, beanB));
This reduces the need for @Configuration classes in test setups and dynamic environments, promoting functional-style configuration.
Java 14+ Language Feature Support
Full support for records, text blocks, and pattern matching in @Bean methods and SpEL expressions. The framework compiles with --enable-preview when targeting Java 14+.
Enhanced type inference in generic method resolution improves usability with modern Java syntax.
AOT Processing Readiness
Improved runtime hints for GraalVM native images via RuntimeHints API. Reflection, resources, and serialization metadata are now auto-detected more accurately.
This lays the foundation for native compilation in Spring Boot 3.0+, reducing manual hint configuration.
R2DBC and Reactive Enhancements
Refined DatabaseClient with better binding support for complex types. Reactive transaction management now supports nested transactions via ConnectionFactory.
WebFlux gains improved CORS handling and virtual thread readiness for Java 21.
Performance Optimizations
Bean definition parsing is 15% faster due to reduced reflection overhead. CGLIB proxy generation uses varhandles on Java 11+ for better performance.
SpEL compilation cache is more aggressive, improving expression evaluation in high-throughput scenarios.
Testing Improvements
@SpringBootTest supports webEnvironment = RANDOM_PORT with embedded Netty. @MockBean now works with final classes on Java 17+ using mockito-inline.
Enhanced TestContext bootstrap for faster test startup.
Dependency Upgrades
| Dependency | Version |
|---|---|
| Jakarta EE | 8 |
| Micrometer | 1.6 |
| Reactor | 2020.0 |
| Jackson | 2.12 |
| Hibernate | 5.5 |
Deprecations
Deprecated WebMvcConfigurerAdapter; implement WebMvcConfigurer directly. XML-based AOP config encouraged to migrate to @EnableAspectJAutoProxy.
Legacy Log4jConfigurer removed in favor of spring-jcl.
Removals
Removed support for Java 7 and earlier. Eliminated deprecated JdbcTemplate batch methods with Object[] arrays.
Tile and Portlet MVC modules are no longer maintained.
Migration and Support
Upgrade from 5.2 by updating the Spring BOM. Replace direct JUL/Log4j usage with SLF4J. Test AOT hints if planning for native images.
Spring Framework 5.3 receives commercial support until 2024, with open-source patches continuing.