Commit Graph

30855 Commits

Author SHA1 Message Date
rstoyanchev b61eee7fb0 Support cross-parameter validation
Closes gh-33271
2024-08-09 18:53:30 +03:00
rstoyanchev 0d64c90a79 Move status/header handling into FragmentsRendering
Based on feedback from htmx-spring-boot. It's more generally useful
to process those from within DefaultFragmentsRendering rather than
in ModelAndViewMethodReturnValueHandler. That way a custom
return value handler can create a FragmentsRendering as well and
get the same result.

See gh-33194
2024-08-09 18:01:15 +03:00
Stéphane Nicoll ce5e247c3b Merge branch '6.1.x' 2024-08-09 15:52:35 +02:00
Stéphane Nicoll 2b8225f11c Polish "Sync GHA setup" 2024-08-09 15:52:27 +02:00
Stéphane Nicoll ae38c88f82 Merge branch '6.1.x' 2024-08-09 15:46:01 +02:00
Stéphane Nicoll 1e6767ac03 Sync GHA setup 2024-08-09 15:37:43 +02:00
Stéphane Nicoll ea2c441008 Merge branch '6.1.x' 2024-08-09 09:52:19 +02:00
Stéphane Nicoll 7a250aa8ea Polish
See gh-33354
2024-08-09 09:52:06 +02:00
Stéphane Nicoll bd61da12b2 Merge branch '6.1.x' 2024-08-09 09:05:12 +02:00
Stéphane Nicoll 21bc8726d6 Merge pull request #33354 from GoncaloPT
* pr/33354:
  Polish "Fix error codes in Customizing Validation Errors section"
  Fix error codes in Customizing Validation Errors section

Closes gh-33354
2024-08-09 09:04:34 +02:00
Stéphane Nicoll df7ac9b308 Polish "Fix error codes in Customizing Validation Errors section"
See gh-33354
2024-08-09 09:03:05 +02:00
Gonçalo Silva 43217bdf06 Fix error codes in Customizing Validation Errors section
See gh-33354
2024-08-09 09:02:53 +02:00
Sam Brannen f6110dda06 Polishing 2024-08-08 17:48:57 +03:00
Sam Brannen cd7c650941 Merge branch '6.1.x' 2024-08-08 17:16:19 +03:00
Robert Danczak a31945f8b6 Fix syntax error in RestClient documentation
Closes gh-33350
2024-08-08 17:15:27 +03:00
Simon Baslé d3e1e35d76 Merge branch '6.1.x' 2024-08-08 15:59:28 +02:00
Simon Baslé a0edf129eb Fix misleading statement in ReactorResourceFactory javadoc
Closes gh-33338
2024-08-08 15:26:10 +02:00
rstoyanchev e670c6b50a Documentation updates for fragment rendering
Closes gh-33195
2024-08-08 16:25:03 +03:00
rstoyanchev 0bac8d48a5 Polishing in view rendering documentation
See gh-33195
2024-08-08 16:25:03 +03:00
rstoyanchev 062c18a81d Add DataBuffer management in fragment rendering
See gh-33194
2024-08-08 16:25:03 +03:00
rstoyanchev 8e2b27e5d8 WebFlux support for SSE with multiline fragments
See gh-33194
2024-08-08 16:25:03 +03:00
rstoyanchev b734156f32 Update WebFlux fragment stream rendering
Thymeleaf has its own special handling for SSE that gets in the way
of fragment rendering. This is why we need to set the response
content-type before streaming, and then pass text/html to the
View for rendering each fragment.

See gh-33194
2024-08-08 16:25:02 +03:00
rstoyanchev f5ed1b8f6d Refactoring in ViewResolutionResultHandler
See gh-33194
2024-08-08 16:25:02 +03:00
Sam Brannen 3863b77536 Merge branch '6.1.x' 2024-08-08 14:20:56 +03:00
Sam Brannen bcffa15c7d Reinstate qualifier support for JSR-330 @⁠javax.inject.Named
This commit revises QualifierAnnotationAutowireCandidateResolver to
reinstate "qualifier" support for the legacy JSR-330
@⁠javax.inject.Named annotation.

See gh-31090
Closes gh-33345
2024-08-08 14:20:06 +03:00
Sam Brannen f9d2641fd5 Update field name to reflect switch to Jakarta 2024-08-08 13:22:00 +03:00
Sam Brannen 3b506e11a1 Polishing 2024-08-08 13:22:00 +03:00
Stéphane Nicoll 4ceefa7501 Merge branch '6.1.x' 2024-08-08 11:41:53 +02:00
Stéphane Nicoll ddee309e11 Merge pull request #33341 from pcvolkmer
* pr/33341:
  Add missing Kotlin example for expectAll()

Closes gh-33341
2024-08-08 11:41:48 +02:00
Paul-Christian Volkmer 7e4884fcfa Add missing Kotlin example for expectAll()
See gh-33341
2024-08-08 11:35:12 +02:00
Stéphane Nicoll 7d72a03427 Start building against Micrometer 1.14.0-M2 snapshots
See gh-33327
2024-08-08 10:55:14 +02:00
Stéphane Nicoll 27aa341ab0 Merge branch '6.1.x' 2024-08-08 10:47:43 +02:00
Jonatan Ivanov 38a3d18256 Start Observation before scope open for Scheduled operation
When ScheduledAnnotationReactiveSupport adds the Observation to the
context, Reactor opens a scope through the Context Propagation API.
This happens before TrackingSubscriber would start the Observation and
opening a scope without starting an Observation is invalid.

This change moves the Observation start before the scope opening.

Closes gh-33349
2024-08-08 10:46:19 +02:00
Stéphane Nicoll dbb3a9ab08 Merge branch '6.1.x' 2024-08-08 09:33:40 +02:00
Jonatan Ivanov 6c74fee5e8 Remove unnecessary error signal from DefaultRestClient
Before UnknownContentTypeException is thrown, it is added to the current
Observation but since UnknownContentTypeException is a
RestClientException, the exception is added again in one of the
catch blocks later on.

Closes gh-33347
2024-08-08 09:30:22 +02:00
Stéphane Nicoll 873c9fe0d8 Merge branch '6.1.x' 2024-08-08 09:14:30 +02:00
Jonatan Ivanov 36e84a5209 Fix RestClient instrumentation
ClientHttpResponse implements Closeable and the close method of
DefaultConvertibleClientHttpResponse also stops the current Observation.

Before this change exiting the try-with-resource block stopped the
Observation since it called close on ClientHttpResponse.
After this, there were multiple error and stop calls on the Observation
in the catch blocks after the Observation was already stopped
which is invalid.

This change reorders the flow by stopping the Observation in the
finally block (closing ClientHttpResponse) and not stopping
the Observation in any of the catch blocks.

Closes gh-33346
2024-08-08 09:11:57 +02:00
Stéphane Nicoll 67838f3ff9 Provide all counters in BatchUpdateException
This commit updates JbcTemplate#batchUpdate to provide additional
information when one batch fails. Previously, the raw
BatchUpdateException was thrown with no way to know what had completed
thus far.

This commit creates an AggregatedBatchUpdateException that wraps the
original BatchUpdateException, yet providing the counters of the batches
that ran prior to the exception. In essence, this represents the same
state as the return value of the method if no batch fails.

AggregateBatchUpdateException exposes the original BatchUpdateException
in advanced case, such as checking for a sub-class that may contain
additional information.

Closes gh-23867
2024-08-08 08:35:06 +02:00
Sam Brannen a55207e88f Add tests for read-only IndexAccessors in 6.2 2024-08-07 19:23:06 +03:00
Sam Brannen b0999641dd Merge branch '6.1.x' 2024-08-07 18:26:13 +03:00
Sam Brannen 1e97b2137b Disable class data sharing (CDS) for tests
Prior to this commit, the Gradle build output the following warning
multiple times.

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Since we don't need CDS enabled for our tests, I've added `-Xshare:off`
as a JVM argument for our tests to disable CDS.

(cherry picked from commit 27985b1439)
2024-08-07 18:08:03 +03:00
Sam Brannen 5e4e530c59 Remove Java 21 classpath entries in Eclipse projects
Since the me.champeau.mrjar stores Java 21 main and test sources in
non-standard locations, and since we can only use a single JDK within
Eclipse, this commit updates `ide.gradle` to remove `java21` classpath
entries in Eclipse projects.
2024-08-07 18:02:43 +03:00
Simon Baslé 70e5af7d16 Polishing: remove unnecessary code 2024-08-07 16:57:52 +02:00
Simon Baslé 52bc3cf5aa Polishing 2024-08-07 16:43:09 +02:00
Stéphane Nicoll 25b57d4808 Merge branch '6.1.x' 2024-08-07 16:32:20 +02:00
Stéphane Nicoll 76b2d13b2c Add support for changing context path in ServletRequestPath
This commit implements modifyContextPath in ServletRequestPath and
apply the same logic of concatenating the servlet path with the
context path.

Closes gh-33251
2024-08-07 16:28:17 +02:00
Simon Baslé 71927b3487 Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/scheduling/concurrent/SimpleAsyncTaskScheduler.java
2024-08-07 16:07:00 +02:00
Aleksey Genus 9b85a246d8 SimpleAsyncTaskScheduler stops accepting new tasks when isShutdown
This changes the criteria for simplified task rejection logging from
to be that the executor is in the shutdown phase, not fully terminated.

See gh-33334
Closes gh-33336
2024-08-07 15:58:27 +02:00
Stéphane Nicoll 313b063aef Polish 2024-08-07 15:28:52 +02:00
Simon Baslé 7052af97a6 Polish test to focus on the FactoryBean results being mocked 2024-08-07 14:57:15 +02:00