Commit Graph
100 Commits
Author SHA1 Message Date
Brian Clozel 30a07ed551 Merge branch '7.0.x' 2026-09-08 11:59:09 +02:00
Brian Clozel 3c6b001349 Reuse existing async timeout in DefaultAsyncServerResponse
Prior to this commit, calling `DefaultAsyncServerResponse.writeAsync()`
would  unconditionally create a new `AsyncWebRequest` and install it
on the `WebAsyncManager`, even when one is already present for the
current request.
The functional web framework can do such a thing when returning a
`ServerResponse.async(future)` from a `HandlerFunction`; the
`HandlerFunctionAdapter` does install an async web request already.

This means that the async timeout configured at the application level
would be ignored and instead falling back to the Servlet container
default.

This commit makes the `DefaultAsyncServerResponse` skip async web
request creation it there is an existing one.

Fixes gh-37257
2026-09-08 11:48:40 +02:00
Brian Clozel 4c8c6409a2 Polishing contribution
See gh-37202
2026-09-07 11:57:05 +02:00
Brian Clozel 1aedfa5d5a Merge branch '7.0.x' 2026-09-07 10:00:25 +02:00
Brian Clozel 26174aa9a0 Update Jar metadata to make Gradle build reproducible
This commit makes use of the Java specification version in the Jar
metadata to make build easier to reproduce on a different environment.

Closes gh-37250
2026-09-07 09:59:12 +02:00
Brian Clozel 93528f096a Merge branch '7.0.x' 2026-09-07 09:35:59 +02:00
Brian Clozel 486db005a1 Add missing Hibernate reflection hints
This commit adds the missing reflection hints for Hibernate 8 support:
`PersistenceUnitInfoDescriptor` and `StatelessSession`.

Fixes gh-37247
Fixes gh-37249
2026-09-07 09:34:38 +02:00
Brian Clozel 9bedb06b9b Merge branch '7.0.x' 2026-09-04 17:34:11 +02:00
Brian Clozel 54b3a8c868 Merge branch '7.0.x' 2026-09-04 17:17:23 +02:00
Brian Clozel 59df1a7031 Merge branch '7.0.x' 2026-09-04 17:09:36 +02:00
Brian Clozel acbae80205 Merge branch '7.0.x' 2026-09-04 16:43:22 +02:00
Brian Clozel 60e5abff7f Enforce "data: " prefix for outgoing SSE data payloads
Prior to this commit, SSE support in Spring would write payloads with
the "data:" prefix (without space). While this is OK with the standard,
this makes it harder for implementations to support reading and writing
payloads with Spring (the round trip use case).

This commit introduces a breaking change and now enforces "data: " in
all variants. This has the potential of breaking some low level test
suites with text/plain or custom media types, but this should overall
make the situation better for developers.

Closes gh-37242
2026-09-04 16:21:13 +02:00
Brian Clozel c39d48a261 Merge branch '7.0.x' 2026-09-04 15:12:07 +02:00
Brian Clozel 815911b39c Upgrade XJC Gradle plugin 2026-09-04 14:17:11 +02:00
Brian Clozel d550ab1313 Count in memory buffered data against limit in PartGeenrator
The new PartGenerator for parsing multipart requests supports buffering
the content in memory and switching to a file after a configured size.
More specifically, when a multipart part exceeds maxInMemorySize and
InMemoryState switches it over to FileState, the bytes that were
already buffered in memory are flushed to the temp file.

Prior to this commit, this was done via FileState.writeBuffer(), meaning
that the in memory buffered data would not be counted against the
configured limit for writing to a file.
This commit fixes this by writing buffered data with FileState.onBody().

Fixes gh-37238
2026-09-04 09:24:15 +02:00
Brian Clozel 136dddb67d Merge branch '7.0.x' 2026-09-03 17:38:29 +02:00
Brian Clozel 6316c06a97 Polishing contribution
See gh-36919
2026-09-03 17:36:26 +02:00
Brian Clozel 2ce9563b3c Merge branch '7.0.x' 2026-09-02 14:45:26 +02:00
Brian Clozel c07da25bdf Update recommendations for web data binding
Most of the documentation updates were already done in gh-36803, this
completes the section with some information on the property path syntax
supported by allowFields/disallowFields.

Closes gh-36789
2026-09-02 14:43:51 +02:00
Brian Clozel 558e8955f0 Merge branch '7.0.x' 2026-09-01 11:20:33 +02:00
Brian Clozel 04b3bdc1b3 Fix reconnection attempt count in ReactorNettyTcpClient
Prior to this commit, the reconnection attempt count provided to the
reconnect strategy would not give the updated, incremented value but
instead the previous one.

This commit fixes this and ensures the value is incremented before it's
given to the strategy.

Fixes gh-37223
2026-09-01 11:18:53 +02:00
Brian Clozel 46913bca91 Revert "Remove unnessary args after Kotlin 2.4 upgrade"
This reverts commit ce00aac748.
2026-09-01 09:54:16 +02:00
Brian Clozel 5ab70bb036 Merge branch '7.0.x' 2026-08-31 20:24:39 +02:00
Brian Clozel f3764f6d62 Fix Gradle metadata for source and javadoc elements
This commit fixes the published Gradle metadata to list proper entries
for `javadocElements` and `sourceElements`.

Fixes gh-37209
2026-08-31 20:23:18 +02:00
Brian Clozel ce00aac748 Remove unnessary args after Kotlin 2.4 upgrade
See gh-37074
2026-08-31 18:46:06 +02:00
Brian Clozel 990d1a8370 Fix Derby warnings
See gh-36045
2026-08-31 18:45:41 +02:00
Brian Clozel 5df0c2dc0c Merge branch '7.0.x' 2026-08-31 18:39:19 +02:00
Brian Clozel 41db0fe5a3 Preserve original headers and cookies when mutating client response
Prior to this commit, the `DefaultClientResponseBuilder` would assume
that an original client HTTP response, when mutated, would not be reused
nor read anymore. While this is the advised use case, there was some
inconsistency with the builder API here when mutating: some data like
the response status would copied, but the HTTP headers and cookies would
refer directly to the previous entries, making all changes visible to
the previous response instance.

This commit ensures that deep copies are performed when mutating a
client response with the builder API.

Fixes gh-37086
2026-08-31 18:36:09 +02:00
Brian Clozel 5524fc6a55 Merge branch '7.0.x' 2026-08-31 12:58:00 +02:00
Brian Clozel b823aed17c Upgrade to Nullability plugin 0.0.15
See gh-37188
2026-08-31 12:57:32 +02:00
Brian Clozel 3eb93a4873 Merge branch '7.0.x' 2026-08-28 18:36:12 +02:00
Brian Clozel 491859b5ce Merge branch '7.0.x' 2026-08-28 18:15:06 +02:00
Brian Clozel 5d6a56fe4a Polishing CacheControl behavior
This commit builds on the previous commit and ensures that
"must-understand" is only used with "no-store". This check is performed
at runtime as a staged interface/builder would be a major breaking
change for a behavior that is highlighted as "SHOULD" in the
specification.

This commit also performs similar runtime checks for:
* cache-public + cache-private
* cache-public + no-store

See gh-36918
2026-08-28 15:49:57 +02:00
Brian Clozel d883602919 Remove mentions of the Derby database support
See gh-36045
2026-08-27 16:57:58 +02:00
Brian Clozel 7daf1013aa Merge branch '7.0.x' 2026-08-27 14:37:23 +02:00
Brian Clozel 3170dd5714 Fix mock servlet request behavior with session ids
Prior to this commit,
`MockHttpServletRequest.isRequestedSessionIdValid()` would return `true`
by default and could only be changed manually with a setter. This does
not align with the Servlet spec because of 1) its default value and 2)
it does not react to `changeSessionId()` calls.

This commit fixes that behavior while still allowing "manual" booleans
being set here.

Fixes gh-36631
2026-08-27 14:34:49 +02:00
Brian Clozel 89047909ea Merge branch '7.0.x' 2026-08-20 18:26:02 +02:00
Brian Clozel df72838ce1 Merge commit 'v7.1.0-M1~1' 2026-08-20 18:18:13 +02:00
Brian Clozel 0e9a1d72f5 Merge commit 'v7.0.9~1' into 7.0.x 2026-08-20 18:17:01 +02:00
Brian Clozel 2730d77f82 Polishing contribution
Closes gh-34993
2026-08-20 14:13:55 +02:00
Brian Clozel d823822dd6 Merge branch '7.0.x' 2026-08-18 09:25:15 +02:00
Brian Clozel 94beae1779 Next development version (7.0.10-SNAPSHOT) 2026-08-18 09:24:40 +02:00
Brian Clozel 14927a959f Upgrade to Reactor 2026.0.0-M1
Closes gh-37107
2026-08-14 09:21:18 +02:00
Brian Clozel efbae85324 Upgrade to Micrometer 1.18.0-M1 and Tracing 1.8.0-M1
Closes gh-37108
2026-08-14 09:21:18 +02:00
Brian Clozel 5abe6d3e5f Centralize Server Sent Event utility methods
Prior to this commit, many classes would support writing Server Sent
Events in some way to the response output stream. This has lead to some
code duplication.

This commit refactors the duplicated code in a shared `SseUtils` class.

Closes gh-37065
2026-08-14 09:19:58 +02:00
Brian Clozel 999f428987 Ensure parsing/tostring symmetry in ContentDisposition
Prior to this commit, building a "Content-Disposition" header to a
String and then parsing it back would not always result in the original
header.

This commit ensures that ContentDisposition guarantees this and honors
the "equals" contract.

Fixes gh-37064
2026-08-14 09:19:58 +02:00
Brian Clozel fd50270b8d Escape SSE view fragments
Prior to this commit, the MVC and WebFlux view fragments rendering would
only partially escape rendered view fragments before sending then as SSE
events. This could in some cases break the SSE stream with invalid data.

This commit ensures that the rendered views are properly escaped before
they are sent as SSE events.

Fixes gh-37061
2026-08-14 09:19:58 +02:00
Brian Clozel b10179ffdf Switch to INTERNAL-SNAPSHOTs 2026-08-14 09:19:58 +02:00
Brian Clozel f8974ad620 Prepare main-internal branch 2026-08-14 09:19:58 +02:00
Brian Clozel a7b1b59cbd Upgrade to Reactor 2025.0.7
Closes gh-37103
2026-08-14 09:12:18 +02:00
Brian Clozel 996e3d3f18 Upgrade to Micrometer 1.16.7
Closes gh-37104
2026-08-14 09:12:18 +02:00
Brian Clozel 35921cc01f Centralize Server Sent Event utility methods
Prior to this commit, many classes would support writing Server Sent
Events in some way to the response output stream. This has lead to some
code duplication.

This commit refactors the duplicated code in a shared `SseUtils` class.

Closes gh-37065
2026-08-14 09:11:50 +02:00
Brian Clozel 062032373e Ensure parsing/tostring symmetry in ContentDisposition
Prior to this commit, building a "Content-Disposition" header to a
String and then parsing it back would not always result in the original
header.

This commit ensures that ContentDisposition guarantees this and honors
the "equals" contract.

Fixes gh-37064
2026-08-14 09:11:50 +02:00
Brian Clozel 1994e0ebd0 Escape SSE view fragments
Prior to this commit, the MVC and WebFlux view fragments rendering would
only partially escape rendered view fragments before sending then as SSE
events. This could in some cases break the SSE stream with invalid data.

This commit ensures that the rendered views are properly escaped before
they are sent as SSE events.

Fixes gh-37061
2026-08-14 09:11:50 +02:00
Brian Clozel dc7fc89aec Switch to INTERNAL-SNAPSHOT versions
See gh-37103
See gh-37104
2026-08-14 09:11:49 +02:00
Brian Clozel f2a7f13d13 Prepare 7.0.x-internal branch 2026-08-14 09:11:49 +02:00
Brian Clozel 51c4539bb6 Stop using deprecated HttpMessageConverterExtractor in StatusHandler
Prior to this commit, `HttpMessageConverterExtractor` was deprecated
with `RestTemplate` and related types. `StatusHandler` was still using
it and causing a deprecation warning.

This commit extracts the relevant implementation from
`DefaultRestClient` and promotes it as a shared static method in
`RestClientUtils`.

Fixes gh-37010
2026-08-05 17:54:02 +02:00
Brian Clozel 4b5c92703c Merge branch '7.0.x' 2026-08-05 10:44:06 +02:00
Brian Clozel c17b4ad787 Merge branch '7.0.x' 2026-08-05 10:09:11 +02:00
Brian Clozel e8729d0438 Switch to SNAPSHOT dependencies
See gh-37107
See gh-37108
2026-08-03 15:17:34 +02:00
Brian Clozel d2d7fd36da Merge branch '7.0.x' 2026-08-03 11:36:43 +02:00
Brian Clozel 0c281fd1ce Fix build SNAPSHOT workflow
This commit ensures that workflow dispatches to docs build only happen
on OSS branches.
This also upgrades the verification project to the latest version.

See gh-37097
2026-08-03 11:36:22 +02:00
Brian Clozel eceebb3077 Merge branch '7.0.x' 2026-07-31 18:52:03 +02:00
Brian Clozel 05619b7450 Fix docs build trigger
See gh-37097
2026-07-31 18:51:39 +02:00
Brian Clozel f3e202e1b5 Merge branch '7.0.x' 2026-07-31 18:26:09 +02:00
Brian Clozel f3ba3c9e1f Fix URL fetching from environment in Gradle build plugin
See gh-37097
2026-07-31 18:25:11 +02:00
Brian Clozel 17002a26cc Merge branch '7.0.x'
# Conflicts:
#	.github/workflows/build-and-deploy-snapshot.yml
#	.github/workflows/release-milestone.yml
#	.github/workflows/release.yml
2026-07-31 18:15:39 +02:00
Brian Clozel 89e62e7e31 Add release train infrastructure
Closes gh-37097
2026-07-31 18:08:03 +02:00
Brian Clozel e4d5ec9c0d Update GitHub workflows and build infrastructure
See gh-37097
2026-07-31 18:05:15 +02:00
Brian Clozel e24f5f2ca7 Merge branch '7.0.x' 2026-07-24 15:15:52 +02:00
Brian Clozel b5de644cbb Do not deploy org.springframework:framework-docs on Central
Fixes gh-36879
2026-07-24 15:15:22 +02:00
Brian Clozel 079992021c Improve MimeType parser for RFC compliance
Prior to this commit, the `MimeType` class would compare raw parameter
values for the equals/hashcode contract. This went against the RFC which
states that quoted and unquoted parameter values are equivalent.

This commit rewrote the entire `MimeType` parser in `MimeTypeUtils`
as a state parser to improve robustness and performance.
The `MimeType` equals, compareTo and hascode contracts now unquote
parameter values before comparing them.

This change also optimizes the `tokenize` function that splits many
comma-separated MIME types into a list. Now that this method isn't used
anywhere else, it is also deprecated as of 7.1. This method was
initially made public to be reused within Spring Framework and has no
particular use in Spring applications in general.

Finally, this also makes `MediaType` and `MimeType` leverage the
`MimeType` LRU cache as much as possible, including when parsing
`Accept:` HTTP headers.

Closes gh-36729
2026-07-24 14:29:36 +02:00
Brian Clozel 224522244f Merge branch '7.0.x' 2026-07-22 10:54:58 +02:00
Brian Clozel 7de2b24d81 Fix primitive array annotation attributes on Java 24 class reading
Prior to this commit, `ClassFileAnnotationDelegate#parseArrayValue`
would only consider `int[]`, `double[]` and `long[]` array
annotation attributes; other primitive array types like `byte[]`
would use a generic path that would use boxed types.

This commit ensures that a comprehensive pass is made for all
primitive typed arrays. Because the `AnnotationValue` hierarchy
is sealed, we can now maje sure that the implementation is
exhaustive.

Closes gh-37083
2026-07-22 10:50:07 +02:00
Brian Clozel 5ac20a8104 Reinstate invalid resource location checks
This checks was removed previously because the location was considered
as invalid in #36695, but they were later reinstated in #36692.

This commit also reinstates the check that prevents static resource
resolution in those locations.

Closes gh-37063
2026-07-17 13:41:38 +02:00
Brian Clozel 12d71c9a9b Merge branch '7.0.x' 2026-07-16 19:21:35 +02:00
Brian Clozel 8fb2f72282 Use ASCII chars in Content-Disposition filename parameter
Prior to this commit, gh-36328 avoided using RFC 2047 encoding for the
"filename" parameter and use ISO-8859-1 only. This change unfortunately
caused issues because some implementations might try and detect the
encoding automatically.

This commit restricts the filename parameter to ASCII encoding only by:
* transliterating characters to the closes ASCII character
("é"->"e", "ä"->"ae"...)
* falling back to "_" for other chacacters with non latin alphabet or
  emojis

Closes gh-37062
2026-07-16 19:21:16 +02:00
Brian Clozel 0791d9a6e3 Merge branch '7.0.x' 2026-07-16 19:10:36 +02:00
Brian Clozel 9024d5ffbd Merge branch '7.0.x' 2026-07-12 11:55:38 +02:00
Brian Clozel 99f6f1a77a Merge branch '7.0.x' 2026-06-08 22:19:46 +02:00
Brian Clozel 298e1db625 Skip web fonts in module javadocs
Prior to this commit, module javadoc packages like
"spring-core-7.0.8-javadoc.jar" would contain 4MB of web fonts in the
`resource-files/fonts/` folder. This increases significantly (often
doubles) the size of the javadoc JAR for little value.

With this commit, Web fonts are packaged with the aggregated Javadocs
for the entire Spring Framework project, but are skipped for inidividual
modules.

Closes gh-36889
2026-06-08 22:15:27 +02:00
Brian Clozel 1bd3ad2050 Merge branch '7.0.x' 2026-06-08 19:51:16 +02:00
Brian Clozel 3f7f75abdb Next development version (v7.0.9-SNAPSHOT) 2026-06-08 19:50:42 +02:00
Brian Clozel 4e39c28b92 Merge branch '7.0.x' 2026-06-08 14:49:45 +02:00
Brian Clozel ba0a9b8923 Upgrade to Reactor 2025.0.6
Closes gh-36884
2026-06-08 14:49:19 +02:00
Brian Clozel 381fa10477 Merge branch '7.0.x' 2026-06-08 10:41:12 +02:00
Brian Clozel 8a192eab1f Upgrade to Micrometer 1.16.6
Closes gh-36883
2026-06-08 10:40:01 +02:00
Brian Clozel ee5c82a2f8 Merge branch '7.0.x' 2026-06-04 12:27:18 +02:00
Brian Clozel 80534f9df6 Polishing contribution
This commit adds further fixes in the same area, since there were
similar bugs in the WriteCompletionHandler:
* databuffers were not always emitted when fully read in the onNext hook
* on completion, the iterator was closed too early, before it was fully
  read
* on completion, writing the next bytebuffers from the iterator would
  always reuse the first one and not update the attachment

Closes gh-36714
2026-06-04 12:18:01 +02:00
Brian Clozel 9b8a851969 Merge branch '7.0.x' 2026-06-04 10:49:36 +02:00
Brian Clozel 6467fca05b Polishing contribution
This fixes a potential regression introduced by the previous commit.
Because the current value was not updated after the temporal was rolled
forward, there were new cases where entire days would be skipped.

Closes gh-36865
2026-06-04 10:22:23 +02:00
Brian Clozel 783388e9f8 Merge branch '7.0.x' 2026-06-03 11:23:03 +02:00
Brian Clozel 86a68a77c4 Support multi-line comments in Server Sent Events
Prior to this commit, comments sent with Server Sent Events could break
the wire format when sent over the network when comments contained line
breaks.
While comments are mainly used for sending keepalive messages, they can
also be used for sending debug data. This commit ensures that line
breaks are properly handled in comments.

Fixes gh-36866
2026-06-03 11:13:32 +02:00
Brian Clozel 25e8395df8 Reject duplicate MIME type parameters
Prior to this commit, MIME type parsing in Spring would allow duplicate
parameters like "text/plain; dupe=1; dupe=2", effectively retaining the
latest value and ignoring the first.

RFC 6838 4.3 states that this should be treated as an error and this
commit ensures that this is the case.

Closes gh-36841
2026-05-26 17:53:28 +02:00
Brian Clozel 68338aa818 Use ASCII chars in Content-Disposition filename parameter
Prior to this commit, gh-36328 avoided using RFC 2047 encoding for the
"filename" parameter and use ISO-8859-1 only. This change unfortunately
caused issues because some implementations might try and detect the
encoding automatically.

This commit restricts the filename parameter to ASCII encoding only by:
* transliterating characters to the closes ASCII character
("é"->"e", "ä"->"ae"...)
* falling back to "_" for other chacacters with non latin alphabet or
  emojis

Fixes gh-36805
2026-05-22 21:33:40 +02:00
Brian Clozel e6590aa1a8 Merge branch '7.0.x'
Closes gh-36753
2026-05-05 11:59:37 +02:00
Brian Clozel 628261d5bb Do not warn against Root Servlet context location
Closes gh-36692
2026-05-05 11:50:28 +02:00
Brian Clozel 41cd6879bd Fix parsing failure for MIME types with quoted pairs
Prior to this commit, MIME types with parameter values that contain a
quoted pair would sometimes fail and parse an incomplete parameter
value.

This commit ensures that the quoted section of the parameter value is
correctly handled.

Fixes gh-36730
2026-05-01 21:47:16 +01:00
Brian Clozel 3a91d90c28 Resolve URL path for versioned webjar directories
Prior to this commit, the `resolveUrlPath` implementation for the
`LiteWebJarsResourceResolver` would always delegate to the resource
chain once the versioned webjar folder has been resolved.

While this aligns with the `ResourceResolver` contract and the fact that
the resource chain does not resolve directories, here the WebJar locator
does support such use cases and we shouldn't get in the way here.

This commit falls back to the resolved versioned WebJar path if no
resource could be resolved and the path ends with "/".

Fixes gh-36726
2026-05-01 21:47:06 +01:00
Brian Clozel 9e4c127eda Merge branch '7.0.x' 2026-04-28 23:36:56 +02:00