Commit Graph

31788 Commits

Author SHA1 Message Date
rstoyanchev
96c494c6ad Update error format in MethodArgumentNotValidException
1. Remove list markers (those can be provided in message).
2. Use ", and " between errors for readability.
3. Remove single quotes around errors.
4. If MessageSource is provided, use resolved message as is since in
that case applications have full control over each message.

Closes gh-30198
2023-06-13 11:29:35 +01:00
Sam Brannen
48548b29d6 Merge branch '6.0.x' 2023-06-13 11:58:37 +02:00
Sam Brannen
f18a85e193 Polish null-safety documentation 2023-06-13 11:57:41 +02:00
Sébastien Deleuze
55b3b28aec Introduce JVM checkpoint/restore support documentation
Closes gh-30647
2023-06-13 10:52:12 +02:00
Sébastien Deleuze
6a26db80b6 Refine RouterFunctionMapping ordering consistency
This commit changes the order of RouterFunctionMapping defined
in WebMvcConfigurationSupport from 3 to -1 in order to achieve
better consistency between WebMVC and WebFlux. It also reduces
the surprise factor. That way, functional routes are always
before annotation-based ones.

Closes gh-30278
2023-06-13 08:17:54 +02:00
rstoyanchev
ccf68878c7 Merge branch '6.0.x' 2023-06-12 16:12:03 +01:00
rstoyanchev
f7d195782f Revert "Temporarily re-enable ReactorNetty2StompBrokerRelayIntegrationTests"
This reverts commit 7e52b803be.
2023-06-12 16:11:42 +01:00
rstoyanchev
bbab4faf7a Method level only, empty RequestMapping matches "" and "/"
Closes gh-30293
2023-06-12 16:11:42 +01:00
Sam Brannen
f7367ceae5 Merge branch '6.0.x' 2023-06-12 16:44:48 +02:00
Sam Brannen
3fb98b6a97 Polishing 2023-06-12 16:43:56 +02:00
Roland Weisleder
dc4f46df9f Fix markup issue in Javadoc of QuartzCronField
Closes gh-30646
2023-06-12 16:40:11 +02:00
Stephane Nicoll
61c9cbc3f5 Retain active profiles used during AOT processing
This commit makes sure that profiles that have been explicitly enabled
during AOT optimizations are automatically enabled when using those
optimizations.

If other profiles are set at runtime, they take precedence over the ones
defined during AOT processing.

Closes gh-30421
2023-06-12 16:33:35 +02:00
Sébastien Deleuze
446b90172b Merge branch '6.0.x' 2023-06-12 16:01:35 +02:00
Sébastien Deleuze
80af7bedef Polish null-safety reference documentation 2023-06-12 16:00:13 +02:00
Juergen Hoeller
6501176081 Merge branch '6.0.x' 2023-06-12 12:59:55 +02:00
Juergen Hoeller
f8c8873c99 Document which @Scheduled attributes support SpEL expressions
Closes gh-29290
2023-06-12 12:57:10 +02:00
Juergen Hoeller
cc8c852c2b Specific check for parent of MethodInvocationInfo ClassLoader
See gh-30389
2023-06-12 12:57:10 +02:00
Sébastien Deleuze
ac35ffef9e Merge branch '6.0.x' 2023-06-12 12:48:42 +02:00
Sébastien Deleuze
fe7f8e2de5 Polish CoWebFilter 2023-06-12 12:48:01 +02:00
Rossen Stoyanchev
6b89cf94a3 Add method validation to WebFlux
See gh-29825
2023-06-12 11:37:55 +01:00
Rossen Stoyanchev
bd054a4918 Add method validation to Spring MVC
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
cb04c3b335 Expose isReturnValue from MethodValidationException
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
5c5d8e61ae Add BindingResultNameResolver option
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
0fef380202 Add MethodValidator
See gh-29825
2023-06-12 11:37:55 +01:00
Rossen Stoyanchev
cc8361cd93 Add MethodValidationResult
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
8b53fecc06 Use List for violations in ParameterErrors
See gh-29825
2023-06-12 11:37:55 +01:00
Rossen Stoyanchev
425d5a94cb Adapt ConstraintViolation's from method validation
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
38abee00e2 Rename MethodValidationTests and polishing
See gh-29825
2023-06-12 11:37:55 +01:00
rstoyanchev
082784e023 Extract delegate from MethodValidationInterceptor
See gh-29825
2023-06-12 11:37:55 +01:00
Juergen Hoeller
155a37d3a6 Merge branch '6.0.x' 2023-06-12 10:50:40 +02:00
Juergen Hoeller
0a5aff1b60 Specific check for parent of spring-aop ClassLoader
Also applied to getProxyClass now.

Closes gh-30389
2023-06-12 10:48:57 +02:00
Vedran Pavic
3d61d9e0d8 Handle custom JMS acknowledgment modes as client acknowledge (#30619)
This commit updates JmsAccessor to handle custom JMS acknowledgment
modes as client acknowledge, which is useful when working with JMS
providers that provide non-standard variations of CLIENT_ACKNOWLEDGE,
such as AWS SQS and its UNORDERED_ACKNOWLEDGE mode.
2023-06-12 10:46:22 +02:00
Sam Brannen
f8a3253d12 Polishing 2023-06-11 16:32:16 +02:00
Sam Brannen
b4ba80b09e Merge branch '6.0.x'
# Conflicts:
#	spring-test/src/main/java/org/springframework/test/context/cache/DefaultCacheAwareContextLoaderDelegate.java
2023-06-11 15:56:23 +02:00
Sam Brannen
1a26e17f41 Ensure context cache stats are logged when ApplicationContext fails to load
Closes gh-30635
2023-06-11 15:46:28 +02:00
Sam Brannen
f6045e8e11 Move context failure tracking to the ContextCache
In the previous commit which introduced the new context failure threshold
support in the TestContext framework, the context failure tracking was
tied to an instance of DefaultCacheAwareContextLoaderDelegate.
Consequently, the feature was only supported within a given test class.

This commit therefore moves context failure tracking to the ContextCache
SPI (and DefaultContextCache) so that the feature applies to all test
classes within the current test suite (i.e., JVM).

This commit also includes the total failure count in the statistics
logged by the DefaultContextCache.

See gh-14182
2023-06-11 15:35:10 +02:00
Sam Brannen
f0a3f776c2 Avoid duplication of constant in Javadoc 2023-06-11 15:20:23 +02:00
Sam Brannen
74dc07e736 Improve ContextCacheTestUtils 2023-06-11 15:15:35 +02:00
Sam Brannen
c5eb4ed978 Introduce context failure threshold support in the TestContext framework
This set of commits introduces ApplicationContext "failure threshold"
support in the Spring TestContext Framework (TCF).

Specifically, this new feature avoids repeated attempts to load a
failing ApplicationContext in the TCF, based on a failure threshold
which defaults to 1 but can be configured via a system property.

See individual commits for details.

Closes gh-14182
2023-06-09 17:50:48 +02:00
Sam Brannen
bff81d3056 Document test context failure threshold support in reference manual
See gh-14182
2023-06-09 17:45:12 +02:00
Sam Brannen
c8bb7ded5d Improve Javadoc for DefaultCacheAwareContextLoaderDelegate
See gh-14182
2023-06-09 17:45:06 +02:00
Sam Brannen
56f3bd86cf Add integration tests for context failure threshold support
See gh-14182
2023-06-09 17:44:44 +02:00
Sam Brannen
52ae97cffc Make test context failure threshold configurable
This commit makes the failure threshold value configurable via a JVM
system property or Spring property named
"spring.test.context.failure.threshold".

See gh-14182
2023-06-09 17:43:29 +02:00
Sam Brannen
c7ca5c81c3 Avoid repeated attempts to load failing ApplicationContext in the TCF
This commit introduces initial support for a new "context failure
threshold" feature in the Spring TestContext Framework (TCF).

Specifically, DefaultCacheAwareContextLoaderDelegate now tracks how
many times a failure occurs when attempting to load an
ApplicationContext and preemptively throws an IllegalStateException for
subsequent attempts to load the same context if the configured failure
threshold has been exceeded.

See gh-14182
2023-06-09 17:40:28 +02:00
Sébastien Deleuze
ccb8db41f0 Merge branch '6.0.x' 2023-06-09 15:21:54 +02:00
Sébastien Deleuze
439bcd6715 Polishing 2023-06-09 15:19:42 +02:00
Sébastien Deleuze
4e33d0c293 Add missing hint for ResourceEditor
Closes gh-30628
2023-06-09 15:19:18 +02:00
Sébastien Deleuze
46fe7f5bea Merge branch '6.0.x' 2023-06-09 14:17:45 +02:00
Sébastien Deleuze
9b4e0e9837 Add missing hint for converting String to URI
Closes gh-30627
2023-06-09 14:14:54 +02:00
Sébastien Deleuze
071d6a2a5a Introduce hints for finding hints by conventions
Closes gh-30491
2023-06-09 14:14:54 +02:00