-
Notifications
You must be signed in to change notification settings - Fork 38.5k
What's New in Spring Framework 6.x
Juergen Hoeller edited this page May 22, 2023
·
157 revisions
- First-class configuration options for virtual threads on JDK 21.
- Lifecycle integration with Project CRaC for JVM checkpoint restore.
- Support for resolving
SequencedCollection/Set/Map
at injection points. - Support for registering a
MethodHandle
as a SpEL function. -
Validator
factory methods for programmatic validator implementations.
- Failed
CompletableFuture
triggers rollback for async transactional method.
- Entire framework codebase based on Java 17 source code level now.
- Migration from
javax
tojakarta
namespace for Servlet, JPA, etc. - Runtime compatibility with Jakarta EE 9 as well as Jakarta EE 10 APIs.
- Compatible with latest web servers: Tomcat 10.1, Jetty 11, Undertow 2.3.
- Early compatibility with virtual threads (in preview as of JDK 19).
- Upgrade to ASM 9.4 and Kotlin 1.7.
- Complete CGLIB fork with support for capturing CGLIB-generated classes.
- Comprehensive foundation for Ahead-Of-Time transformations.
- First-class support for GraalVM native images (see related Spring Boot 3 blog post).
- Basic bean property determination without
java.beans.Introspector
by default. - AOT processing support in
GenericApplicationContext
(refreshForAotProcessing
). - Bean definition transformation based on pre-resolved constructors and factory methods.
- Support for early proxy class determination for AOP proxies and configuration classes.
-
PathMatchingResourcePatternResolver
uses NIO and module path APIs for scanning, enabling support for classpath scanning within a GraalVM native image and within the Java module path, respectively. -
DefaultFormattingConversionService
supports ISO-based defaultjava.time
type parsing.
- Support for predetermining JPA managed types (for inclusion in AOT processing).
- JPA support for Hibernate ORM 6.1 (retaining compatibility with Hibernate ORM 5.6).
- Upgrade to R2DBC 1.0 (including R2DBC transaction definitions).
- Aligned data access exception translation between JDBC, R2DBC, JPA and Hibernate.
- Removal of JCA CCI support.
-
RSocket interface client based on
@RSocketExchange
service interfaces. - Early support for Reactor Netty 2 based on Netty 5 alpha.
- Support for Jakarta WebSocket 2.1 and its standard WebSocket protocol upgrade mechanism.
-
HTTP interface client based on
@HttpExchange
service interfaces. - Support for RFC 7807 problem details.
- Unified HTTP status code handling.
- Support for Jackson 2.14.
- Alignment with Servlet 6.0 (while retaining runtime compatibility with Servlet 5.0).
-
PathPatternParser
used by default (with the ability to opt intoPathMatcher
). - Removal of outdated Tiles and FreeMarker JSP support.
- New
PartEvent
API to stream multipart form uploads (both on client and server). - New
ResponseEntityExceptionHandler
to customize WebFlux exceptions and render RFC 7807 error responses. -
Flux
return values for non-streaming media types (no longer collected toList
before written). - Early support for Reactor Netty 2 based on Netty 5 alpha.
- JDK
HttpClient
integrated withWebClient
.
Direct Observability instrumentation with Micrometer Observation in several parts of the Spring Framework. The spring-web
module now requires io.micrometer:micrometer-observation:1.10+
as a compile dependency.
-
RestTemplate
andWebClient
are instrumented to produce HTTP client request observations. - Spring MVC can be instrumented for HTTP server observations using the new
org.springframework.web.filter.ServerHttpObservationFilter
. - Spring WebFlux can be instrumented for HTTP server observations using the new
org.springframework.web.filter.reactive.ServerHttpObservationFilter
. - Integration with Micrometer Context Propagation for
Flux
andMono
return values from controller methods.
- Support for testing AOT-processed application contexts on the JVM or within a GraalVM native image.
- Integration with HtmlUnit 2.64+ request parameter handling.
- Servlet mocks (
MockHttpServletRequest
,MockHttpSession
) are based on Servlet API 6.0 now.