Fix links to reference manual

master
Sam Brannen 2 months ago
parent
commit
d7bb637b74
  1. 30
      Spring-Framework-7.0-Release-Notes.md

30
Spring-Framework-7.0-Release-Notes.md

@ -85,7 +85,7 @@ can use such libraries directly and perform the rendering phase in web handlers. @@ -85,7 +85,7 @@ can use such libraries directly and perform the rendering phase in web handlers.
### Null Safety
Spring nullness annotations with JSR 305 semantics are deprecated in favor of [JSpecify annotations](https://jspecify.dev/docs/user-guide/). The Spring Framework codebase has been migrated to Specify and now specifies the nullness of array/vararg elements and generic types. You can find more details in [this dedicated section of the reference documentation](https://docs.spring.io/spring-framework/reference/core/null-safety.html) and in the blog post [Null-safe applications with Spring Boot 4](https://spring.io/blog/2025/11/12/null-safe-applications-with-spring-boot-4).
Spring nullness annotations with JSR 305 semantics are deprecated in favor of [JSpecify annotations](https://jspecify.dev/docs/user-guide/). The Spring Framework codebase has been migrated to Specify and now specifies the nullness of array/vararg elements and generic types. You can find more details in [this dedicated section of the reference documentation](https://docs.spring.io/spring-frameworkreference/7.0.0/core/null-safety.html) and in the blog post [Null-safe applications with Spring Boot 4](https://spring.io/blog/2025/11/12/null-safe-applications-with-spring-boot-4).
### Servlet 6.1 and WebSocket 2.2
@ -129,7 +129,7 @@ an additional check invoking [`KotlinDetector#hasSerializableAnnotation`](https: @@ -129,7 +129,7 @@ an additional check invoking [`KotlinDetector#hasSerializableAnnotation`](https:
We added new codecs for JSON (de)serialization in WebFlux, namely `GsonEncoder` and `GsonDecoder`.
Because the `Gson` library itself does not support decoding JSON in a non-blocking fashion, the `GsonDecoder` does not support decoding to `Flux<*>` types. The encoder does support NDJSON for streaming when serializing to JSON.
### GraalVM Native applications
### GraalVM Native Applications
Spring Framework 7.0 switches to the unified reachability metadata format, being adopted by the GraalVM community.
Applications contributing `RuntimeHints` should apply the following changes.
@ -165,9 +165,9 @@ As of [#34850](https://github.com/spring-projects/spring-framework/pull/34850), @@ -165,9 +165,9 @@ As of [#34850](https://github.com/spring-projects/spring-framework/pull/34850),
## New and Noteworthy
### Null safety
### Null Safety
The Spring Framework codebase is annotated with [JSpecify](https://jspecify.dev/docs/start-here/) annotations to declare the nullness of APIs, fields, and related type usage. JSpecify provides significant enhancements compared to the previous JSR 305 based arrangement, such as properly defined specifications, a canonical dependency with no split-package issue, better tooling, better Kotlin integration, and the capability to specify nullness for generic types, arrays, and vararg elements. Using JSpecify annotations is also recommended for Spring-based applications. For more on this, [check out the revisited "Null Safety" section of our reference documentation](https://docs.spring.io/spring-framework/reference/7.0/core/null-safety.html).
The Spring Framework codebase is annotated with [JSpecify](https://jspecify.dev/docs/start-here/) annotations to declare the nullness of APIs, fields, and related type usage. JSpecify provides significant enhancements compared to the previous JSR 305 based arrangement, such as properly defined specifications, a canonical dependency with no split-package issue, better tooling, better Kotlin integration, and the capability to specify nullness for generic types, arrays, and vararg elements. Using JSpecify annotations is also recommended for Spring-based applications. For more on this, [check out the revisited "Null Safety" section of our reference documentation](https://docs.spring.io/spring-frameworkreference/7.0.0/core/null-safety.html).
### Class-File API usage for Java 24+ apps
@ -175,15 +175,15 @@ Spring Framework reads class bytecode to collect metadata about the application @@ -175,15 +175,15 @@ Spring Framework reads class bytecode to collect metadata about the application
Java 24 introduced a new [Class-File API with JEP 484](https://openjdk.org/jeps/484) for reading and writing classes as Java bytecode. Spring Framework 7.0 adopts this feature for Java 24+ applications with a new `ClassFileMetadataReader` implementation in `spring-core`. This should be completely transparent for applications.
### Programmatic bean registration
### Programmatic Bean Registration
Applications should never attempt to register several beans within a single `@Bean` method in a `@Configuration` class. Similarly, `@Bean` methods should declare the most concrete type as their return type. Those requirements often get in the way of more flexible bean registrations when more logic is required, or when multiple registration is needed.
This major version introduces a new programmatic bean registration mechanism with the `BeanRegistrar` contract that will help with such use cases. See the new ["Programmatic Bean Registration" section in the reference documentation](https://docs.spring.io/spring-framework/reference/core/beans/java/programmatic-bean-registration.html).
This major version introduces a new programmatic bean registration mechanism with the `BeanRegistrar` contract that will help with such use cases. See the new ["Programmatic Bean Registration" section in the reference documentation](https://docs.spring.io/spring-frameworkreference/7.0.0/core/beans/java/programmatic-bean-registration.html).
### `Optional` support with null-safe and Elvis operators in SpEL expressions
The `java.util.Optional` type is now better supported in SpEL expressions. Not only can you now call [null-safe operations on `Optional` types](https://docs.spring.io/spring-framework/reference/7.0/core/expressions/language-ref/operator-safe-navigation.html#expressions-operator-safe-navigation-optional) with transparent unwrapping, but you can also use [the Elvis operator](https://docs.spring.io/spring-framework/reference/7.0/core/expressions/language-ref/operator-elvis.html) to automatically unwrap an `Optional`.
The `java.util.Optional` type is now better supported in SpEL expressions. Not only can you now call [null-safe operations on `Optional` types](https://docs.spring.io/spring-framework/reference/core/expressions/language-ref/operator-safe-navigation.html#expressions-operator-safe-navigation-optional) with transparent unwrapping, but you can also use [the Elvis operator](https://docs.spring.io/spring-framework/reference/core/expressions/language-ref/operator-elvis.html) to automatically unwrap an `Optional`.
### Consistent proxy type defaulting and consistent opting out for specific beans
@ -195,7 +195,7 @@ Opting out is possible for individual beans through the new `@Proxyable` annotat @@ -195,7 +195,7 @@ Opting out is possible for individual beans through the new `@Proxyable` annotat
The Spring team has been working on the [Spring Retry project](https://github.com/spring-projects/spring-retry) for a very long time, and we decided that it was time to trim unnecessary features, revisit some of its APIs, and merge the resulting work into the `spring-core` module of Spring Framework. This new foundational retry support is located in the `org.springframework.core.retry` package, which includes `RetryTemplate`, `RetryPolicy`, and supporting classes.
Aligned with `core.retry`, there is also `@Retryable` annotation support in the `spring-context` module, accompanied by a `@ConcurrencyLimit` annotation based on Spring's concurrency throttling support. Both of those can be conveniently enabled through `@EnableResilientMethods` on a `@Configuration` class. Check out the new [resilience chapter](https://docs.spring.io/spring/reference/7.0/core/resilience.html) in the reference documentation as well as the related [blog post](https://spring.io/blog/2025/09/09/core-spring-resilience-features).
Aligned with `core.retry`, there is also `@Retryable` annotation support in the `spring-context` module, accompanied by a `@ConcurrencyLimit` annotation based on Spring's concurrency throttling support. Both of those can be conveniently enabled through `@EnableResilientMethods` on a `@Configuration` class. Check out the new [resilience chapter](https://docs.spring.io/spring/reference/core/resilience.html) in the reference documentation as well as the related [blog post](https://spring.io/blog/2025/09/09/core-spring-resilience-features).
Note that `@Retryable` (including its customization through annotation attributes) automatically adapts to reactive methods with a reactive return type, decorating the pipeline with Reactor’s retry capabilities. Regular imperative methods will be invoked via a `RetryTemplate` with a corresponding `RetryPolicy`.
@ -211,11 +211,11 @@ After `JdbcClient` and `RestClient` in 6.1, Spring Framework 7.0 introduces a `J @@ -211,11 +211,11 @@ After `JdbcClient` and `RestClient` in 6.1, Spring Framework 7.0 introduces a `J
`JmsClient` provides reusable operation handles which can be configured with custom QoS settings. With a similar design, `JdbcClient` conveniently provides statement-level settings such as fetch size, max rows, and query timeout now.
### API versioning
### API Versioning
Spring MVC and WebFlux now provide first class support for API versioning. On the server side, you can map requests to controller methods and route requests to functional endpoints by taking into account the API version of the request. You can configure how the API version is resolved, parsed, and validated, mark versions as deprecated in order to notify clients, and more. On the client side, there is support for setting the API version on requests in `RestClient`, `WebClient`, and also with HTTP interface clients. On the testing side, there is support in `WebTestClient` as well as in MockMvc.
For more details see the reference docs for [Spring MVC](https://docs.spring.io/spring-framework/reference/7.0/web/webmvc-versioning.html) and [WebFlux](https://docs.spring.io/spring-framework/reference/7.0/web/webflux-versioning.html), and the blog post [API Versioning in Spring](https://spring.io/blog/2025/09/16/api-versioning-in-spring).
For more details see the reference docs for [Spring MVC](https://docs.spring.io/spring-framework/reference/web/webmvc-versioning.html) and [WebFlux](https://docs.spring.io/spring-framework/reference/web/webflux-versioning.html), and the blog post [API Versioning in Spring](https://spring.io/blog/2025/09/16/api-versioning-in-spring).
### HTTP Interface Client configuration
@ -236,7 +236,7 @@ static class HttpServicesConfiguration extends AbstractHttpServiceRegistrar { @@ -236,7 +236,7 @@ static class HttpServicesConfiguration extends AbstractHttpServiceRegistrar {
}
```
For more details, see the [reference documentation](https://docs.spring.io/spring-framework/reference/7.0/integration/rest-clients.html#rest-http-service-client-group-config), and the blog post [HTTP Service Client Enhancements](https://spring.io/blog/2025/09/23/http-service-client-enhancements).
For more details, see the [reference documentation](https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-service-client-group-config), and the blog post [HTTP Service Client Enhancements](https://spring.io/blog/2025/09/23/http-service-client-enhancements).
### HTTP Interface Client support for `InputStream` and `OutputStream`
@ -249,7 +249,7 @@ We started this migration back in 5.0, introducing the `PathPattern` option, the @@ -249,7 +249,7 @@ We started this migration back in 5.0, introducing the `PathPattern` option, the
Community members reached out and shared that there was one last missing feature that was preventing their upgrade:
the ability to match many path segments at the beginning of the path (think, `"/**/pages/index.html"`).
This is now supported, and we described more thoroughly [the allowed patterns in the reference documentation](https://docs.spring.io/spring-framework/reference/7.0/web/webmvc/mvc-controller/ann-requestmapping.html#mvc-ann-requestmapping-uri-templates).
This is now supported, and we described more thoroughly [the allowed patterns in the reference documentation](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-requestmapping.html#mvc-ann-requestmapping-uri-templates).
### Easier message converters configuration with `HttpMessageConverters`
@ -277,7 +277,7 @@ Similar methods exist for `RestClient` and RestTemplate. @@ -277,7 +277,7 @@ Similar methods exist for `RestClient` and RestTemplate.
### Pausing of Test Application Contexts
As of Spring Framework 7.0, an application context stored in the test context cache will be stopped when it is no longer actively in use and automatically restarted the next time it is needed. This ensures that background processes within the context are not actively running while the context is not used by tests. For more details, see the [reference documentation](https://docs.spring.io/spring-framework/reference/7.0/testing/testcontext-framework/ctx-management/caching.html).
As of Spring Framework 7.0, an application context stored in the test context cache will be stopped when it is no longer actively in use and automatically restarted the next time it is needed. This ensures that background processes within the context are not actively running while the context is not used by tests. For more details, see the [reference documentation](https://docs.spring.io/spring-framework/reference/testing/testcontext-framework/ctx-management/caching.html).
### Improved Dependency Injection in `@Nested` Test Class Hierarchies
@ -293,8 +293,8 @@ This is a popular enhancement request coming from the community: providing a non @@ -293,8 +293,8 @@ This is a popular enhancement request coming from the community: providing a non
Developers like the way `WebTestClient` can test live servers and mock setups, with a fluent API and nice assertions.
This is now done with the new `RestTestClient`; you can bind it to a live server, an MVC `@Controller` or the application context.
See the new [`RestTestClient` documentation section](https://docs.spring.io/spring-framework/reference/7.0/testing/resttestclient.html#page-title) for more.
See the new [`RestTestClient` documentation section](https://docs.spring.io/spring-framework/reference/testing/resttestclient.html#page-title) for more.
### Context Propagation for Kotlin Coroutines
Kotlin developers shared that while context propagation for traces worked well for blocking and reactive applications, this information is not available during the execution of a Kotlin Coroutine. This new release introduces [automatic context propagation](https://docs.spring.io/spring-framework/reference/7.0/languages/kotlin/coroutines.html#coroutines.propagation) for Coroutines via the [`PropagationContextElement`](https://docs.spring.io/spring-framework/reference/7.0/languages/kotlin/coroutines.html#coroutines.propagation) operator.
Kotlin developers shared that while context propagation for traces worked well for blocking and reactive applications, this information was not available during the execution of a Kotlin Coroutine. This new release introduces [automatic context propagation](https://docs.spring.io/spring-framework/reference/languages/kotlin/coroutines.html#coroutines.propagation) for Coroutines via the [`PropagationContextElement`](https://docs.spring.io/spring-framework/reference/languages/kotlin/coroutines.html#coroutines.propagation) operator.

Loading…
Cancel
Save