Commit Graph

28014 Commits

Author SHA1 Message Date
Stephane Nicoll
e109c55192 Upgrade to Reactor 2023.0.0-M3
Closes gh-31219
2023-09-13 21:10:46 +02:00
Stephane Nicoll
8f21c228b8 Upgrade to Micrometer 1.12.0-M3
Closes gh-31218
2023-09-13 21:10:46 +02:00
Sam Brannen
a220c545fc Support declarative ContextCustomizerFactory registration in the TCF
Prior to this commit, it was only possible to register a
ContextCustomizerFactory in the TestContext framework (TCF) via the
SpringFactoriesLoader mechanism.

This commit introduces support for declarative registration of a
ContextCustomizerFactory local to a test class via a new
@ContextCustomizerFactories annotation.

Closes gh-26148
2023-09-13 19:59:50 +02:00
Sam Brannen
99a50e7cea Polishing 2023-09-13 19:52:17 +02:00
Sébastien Deleuze
68ba55bea9 Fix ModelInitializerKotlinTests
See gh-30894
2023-09-13 18:30:01 +02:00
Sébastien Deleuze
bb85d9b5e4 Merge branch '6.0.x' 2023-09-13 18:07:59 +02:00
Sébastien Deleuze
29a4dabbe7 Support @ModelAttribute with suspending function in WebFlux
Closes gh-30894
2023-09-13 17:59:39 +02:00
Sam Brannen
a678be80ea Merge branch '6.0.x' 2023-09-13 17:51:02 +02:00
Sam Brannen
f5f8eab405 Remove duplicated section links for test annotations
Since the auto-generated "Section Summary" includes the exact same
links, there's no need to manually duplicate them.
2023-09-13 17:50:12 +02:00
Juergen Hoeller
550f05c9dc Merge branch '6.0.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java
2023-09-13 17:28:54 +02:00
Juergen Hoeller
659500bc1f Polishing 2023-09-13 17:27:32 +02:00
Juergen Hoeller
4235a11c4f Throw IllegalArgumentException for unsupported Duration values
Closes gh-31210
2023-09-13 17:15:32 +02:00
Juergen Hoeller
966b0a92c6 Defensively call Resource.getFile() for fallback resolution
Closes gh-31216
2023-09-13 17:14:04 +02:00
Sam Brannen
5bcbcb3049 Simplify SynthesizedMergedAnnotationInvocationHandler.invoke() 2023-09-13 17:14:03 +02:00
Sam Brannen
fe7355d5b0 Polishing 2023-09-13 17:04:39 +02:00
Sam Brannen
a271d5ec15 Use nullSafeHashCode() in SynthesizedMergedAnnotationInvocationHandler
In light of the refinements to ObjectUtils, this commit updates
SynthesizedMergedAnnotationInvocationHandler to use
ObjectUtils.nullSafeHashCode() and removes the now obsolete code in
SynthesizedMergedAnnotationInvocationHandler.

See gh-29051
2023-09-13 16:50:58 +02:00
Sam Brannen
af13967e2a Polishing 2023-09-13 16:50:58 +02:00
Juergen Hoeller
ae8a353041 Reject iterable/collection value for positional parameter
Closes gh-31215
2023-09-13 16:50:01 +02:00
Juergen Hoeller
8f6c56fe9a Support for one-time tasks with just @Scheduled(initialDelay=...)
Closes gh-31211
2023-09-13 16:48:54 +02:00
Sam Brannen
e63e3a6d28 Delete obsolete constants 2023-09-13 16:13:09 +02:00
Sam Brannen
fa1dd74aff Merge branch '6.0.x' 2023-09-13 16:10:29 +02:00
Sam Brannen
4ca70256d6 Backport polishing 2023-09-13 16:09:59 +02:00
Sam Brannen
5dacf688b2 Polishing 2023-09-13 16:01:11 +02:00
Sam Brannen
e5f18798ca Revert deprecation of [Simple]CommandLinePropertySource
This commit reverts the deprecation of CommandLinePropertySource and
SimpleCommandLinePropertySource, since we have discovered that Spring
Boot actively uses SimpleCommandLinePropertySource in
org.springframework.boot.SpringApplication.

Closes gh-31207
2023-09-13 15:58:00 +02:00
Stephane Nicoll
01f717375b Introduce ObjectUtils#nullSafeHash(Object... element)
This commit deprecates the various nullSafeHashCode methods taking array
types as they are superseded by Arrays.hashCode now. This means that
the now only remaining nullSafeHashCode method does not trigger a
warning only if the target type is not an array. At the same time, there
are multiple use of this method on several elements, handling the
accumulation of hash codes.

For that reason, this commit also introduces a nullSafeHash that takes
an array of elements. The only difference between Objects.hash is that
this method handles arrays.

The codebase has been reviewed to use any of those two methods when it
is possible.

Closes gh-29051
2023-09-13 15:14:34 +02:00
Stephane Nicoll
f2e898d35d Polish 2023-09-13 14:30:01 +02:00
rstoyanchev
bd4b3866fc Revise solution for WebFlux JettyRequestUpgradeStrategy
See gh-30344
2023-09-13 13:25:13 +01:00
Sam Brannen
c23795a8a6 Update copyright headers 2023-09-13 13:57:51 +02:00
Sam Brannen
c598f0565a Deprecate CommandLinePropertySource and associated implementations
Closes gh-31207
2023-09-13 13:56:24 +02:00
Sam Brannen
e7cf54d4e2 Revise SpEL inline collection caching improvements
This commit revises the contribution for gh-25921 in the following ways.

- Use instanceof pattern matching

- Use List.of() and Map.of()

- Add missing @⁠since tags

- Polish Javadoc

- Rename isNegativeNumber() to isNegativeNumberLiteral()

- Restructure InlineCollectionTests using @⁠Nested, etc.

- Fix testListWithVariableNotCached() test: it previously set a SpEL
  "variable" but tested a "property" in the root context object, which
  effectively did not test anything.

- Introduce additional tests: listWithPropertyAccessIsNotCached(),
  mapWithVariableIsNotCached(), and mapWithPropertyAccessIsNotCached().
2023-09-13 13:35:41 +02:00
Sam Brannen
2cc1ee78c1 Polishing 2023-09-13 13:33:21 +02:00
rstoyanchev
1f1f222b8b Partial revert of 1f8913a9
For WebFlux we can't use ServletContextAware.

See gh-30344
2023-09-13 12:05:09 +01:00
rstoyanchev
74182cd3d6 Ensure correct detection of Jetty WebSocket server 2023-09-13 09:34:07 +01:00
rstoyanchev
1f8913a96c Support Jetty WebSocket server parameters
Closes gh-30344
2023-09-13 09:34:07 +01:00
rstoyanchev
29e3acc887 Re-enable Jetty in spring-websocket tests 2023-09-13 09:34:07 +01:00
Sébastien Deleuze
5d454390f0 Polishing
See gh-25921
2023-09-13 10:29:32 +02:00
Semyon Danilov
6f9546722a Improve SpEL inline collection caching
This commit fixes SpEL inline collection caching with
with negative keys or values.

Closes gh-25921
2023-09-13 10:29:01 +02:00
Sébastien Deleuze
6548cee20a Document CoWebFilter.COROUTINE_CONTEXT_ATTRIBUTE
See gh-27522
2023-09-12 19:27:49 +02:00
Sébastien Deleuze
abb296c7d2 Remove Java code dependency on CoWebFilter
To avoid compilation errors in Eclipse which does
not support Java code dependency on Kotlin code.

See gh-27522
2023-09-12 19:27:49 +02:00
Sam Brannen
b6fdfe8ee3 Remove duplicated terms in documentation
... using the following RegEx to find them:

(?<!\S)(\w+)(?:\s+\1)+(?!\S)
2023-09-12 19:00:28 +02:00
Sam Brannen
345910591a Polishing 2023-09-12 15:08:11 +02:00
Arjen Poutsma
9df735b3ab Merge pull request #30028 from yuzawa-san:request-predicate-commit
* gh-30028:
  Polishing external contribution
  Improve attribute handling in RequestPredicates
2023-09-12 12:36:23 +02:00
Arjen Poutsma
c5c843696b Polishing external contribution 2023-09-12 12:34:44 +02:00
James Yuzawa
39786e4790 Improve attribute handling in RequestPredicates
This commit changes the way request attributes are handled in
RequestPredicates. Previously, the AND/OR/NOT predicates copied all
attributes in a map, and restored that when the delegate predicate(s)
failed.
Now, we only set the attributes when all delegates have succeeded.

Closes gh-30028
2023-09-12 12:34:44 +02:00
Rossen Stoyanchev
ed172d6269 ByteBuffer handling for Jetty WebSocket messages
Closes gh-31182
2023-09-12 10:08:57 +01:00
rstoyanchev
f51838b6ba Polishing spring-websocket tests 2023-09-12 10:08:57 +01:00
Brian Clozel
19588d413d Auto-detect observability beans in WebHttpHandlerBuilder
This commit ensures that both `ObservationRegsitry` and
`ServerRequestObservationConvention` beans are automatically detected in
the application context if they are unique. This aligns with the
existing behavior for all other builder methods.

Closes gh-31205
2023-09-11 21:17:14 +02:00
Sébastien Deleuze
dfd631e662 Merge branch '6.0.x' 2023-09-11 18:10:13 +02:00
Sébastien Deleuze
c892ce5537 Refine CORS documentation for wildcard processing
This commit adds a reference documentation section dedicated
to CORS credentialed requests and related wildcard processing.

Closes gh-31143
2023-09-11 18:07:47 +02:00
Sébastien Deleuze
76b8bb2c75 Refine CORS documentation for wildcard processing
This commit refines CORS wildcard processing Javadoc to
provides more details on how wildcards are handled for
Access-Control-Allow-Methods, Access-Control-Allow-Headers
and Access-Control-Expose-Headers CORS headers.

For Access-Control-Expose-Headers, it is not possible to copy
the response headers which are not available at the point
when the CorsProcessor is invoked. Since all the major browsers
seem to support wildcard including on requests with credentials,
and since this is ultimately the user-agent responsibility to
check on client-side what is authorized or not, Spring Framework
continues to support this use case.

See gh-31143
2023-09-11 18:07:31 +02:00