Commit Graph

29923 Commits

Author SHA1 Message Date
Sam Brannen
a01f7cefae Polish Javadoc for SpelNode 2024-04-19 14:27:11 +02:00
Brian Clozel
ccf9ba86a0 Merge branch '6.1.x' 2024-04-18 21:45:23 +02:00
Brian Clozel
0268180799 Rethrow unhandled JMS listener exceptions
Fixes gh-32666
2024-04-18 21:44:44 +02:00
Brian Clozel
0893cf948d Merge branch '6.1.x' 2024-04-18 21:27:50 +02:00
Brian Clozel
da4547a27e Extend observations to RestClient ResponseSpec
Prior to this commit, the `RestClient` observations would be stopped as
soon as the exchange function was called. This means that all errors
related to response decoding or mapping would not be recorded by the
obsevations.

This commit extends the observation recording to the `ResponseSpec` DSL
calls as well as custom exchange functions.

Fixes gh-32575
2024-04-18 21:26:18 +02:00
Arjen Poutsma
62a1b5558f Resolve UrlParser review comments
See gh-32513
2024-04-18 15:20:02 +02:00
rstoyanchev
aa05a6a3b3 Merge branch '6.1.x' 2024-04-18 14:18:43 +01:00
rstoyanchev
97eddb769a Avoid duplicate subscriptionId's in destinationCache
Closes gh-32625
2024-04-18 14:18:30 +01:00
Simon Baslé
a985c0bb35 Polishing: fix link fragments in test bean override annotation pages 2024-04-18 14:54:57 +02:00
Juergen Hoeller
e42c5ca52b Merge branch '6.1.x' 2024-04-18 12:20:14 +02:00
Juergen Hoeller
0e0397a385 Polishing 2024-04-18 12:18:18 +02:00
Juergen Hoeller
fec4f9b8cb Add test for pre-resolved target type on RootBeanDefinition
See gh-32649
2024-04-18 12:17:17 +02:00
Juergen Hoeller
4e20cdeb43 Expand comment on participation in existing transaction
Closes gh-32659
2024-04-18 12:16:33 +02:00
Sam Brannen
f96d0a6c4a Merge branch '6.1.x' 2024-04-18 11:54:02 +02:00
yhao3
7f27ba3902 Update links to HttpOnly documentation at OWASP in ResponseCookie
Closes gh-32663
2024-04-18 11:52:50 +02:00
rstoyanchev
0bc447c304 Jackson decoder supports array/Collection elements
Closes gh-32579
2024-04-18 10:40:25 +01:00
Michael Kunze
00c7002354 Fix typo in class name
Closes gh-32664
2024-04-18 09:32:10 +02:00
Onji Kim
ec055da7c3 Reject negative Content-Length values in HttpHeaders
Prior to this commit, `HttpHeaders#setContentLength` would accept
negative values. Those are not allowed by the RFC and the headers
implementation only uses "-1" as a way to convey that no value was set.

This commit ensures that negative values are rejected.

Fixes gh-32660
2024-04-17 23:05:13 +02:00
Brian Clozel
c03f798dad Merge branch '6.1.x' 2024-04-17 22:47:44 +02:00
Brian Clozel
b3a45670f9 Do not set 0 Content-Length header in BufferingClientHttpRequestFactory
Prior to this commit, the `BufferingClientHttpRequestFactory`, through
the `AbstractBufferingClientHttpRequest`, would set a "Content-Length"
header value, even if the buffered body was empty.

This behavior is invalid since no request body would be set by the
client code in the first place.

This commit ensures that this header is only set if a request body has
been buffered and is about to be written to the request.

Fixes gh-32650
2024-04-17 22:44:36 +02:00
Arjen Poutsma
af23cc233e Add support for state override in new URL parser
See gh-32513
2024-04-17 16:33:53 +02:00
Arjen Poutsma
f21e05a9e4 Introduce new URL parser
This commit introduces a new URL parser based on algorithm provided in
the Living URL standard. This new UrlParser is used by
UriComponentsBuilder::fromUriString, replacing the regular expressions.

Closes gh-32513
2024-04-17 11:17:01 +02:00
Sam Brannen
8727d723f3 Polish "Bean Overriding in Tests" support 2024-04-16 17:08:15 +02:00
Simon Baslé
ce8758b83c Merge branch '6.1.x' 2024-04-16 16:47:01 +02:00
xumengqi
8ec27438e7 Fix transaction definition setTimeout error message since zero is valid
This commit rephrases the `DefaultTransactionDefinition#setTimeout`
exception message to better reflect the fact that 0 is a valid input
value.

Even though this often leads to a transaction immediately timing out
after opening, there is one notable case where this has another
meaningful effect: in Jakarta transactions (`UserTransaction`), when
passing 0 "the transaction service restores the default value".

Closes gh-32635
2024-04-16 16:39:23 +02:00
Simon Baslé
43b5c81dad Merge branch '6.1.x' 2024-04-16 16:29:53 +02:00
xumengqi
bf3278596c Include actual cause's message in various parsing exception messages
This change improves the message of several parsing-related exceptions
that would previously entirely swallow the original exception's message
and sometimes have a slightly misleading message as a result.

This is done by appending the cause's `toString` representation to the
IllegalArgumentException messages instead of an hardcoded "cause".

Closes gh-32636
2024-04-16 16:25:42 +02:00
Sam Brannen
69cb2a347a Update copyright date
See gh-32647
2024-04-16 15:11:12 +02:00
janghs
0d4ef4eafe Omit empty resource description in DeprecatedBeanWarner's log message
Closes gh-32647
2024-04-16 15:07:18 +02:00
Arjen Poutsma
051fd2ae4f Merge branch '6.1.x' 2024-04-16 11:44:02 +02:00
Arjen Poutsma
3971632415 Reintroduce SimpleClientHttpRequestFactory limitations
Closes gh-32641
2024-04-16 11:43:09 +02:00
Simon Baslé
02ee5de470 Document bean override in TestContext framework section of the manual
This change splits the documentation in the reference manual: the
`@TestBean`, `@MockitoBean` and `@MockitoSpyBean` annotations are kept
in the appendix and the general documentation about the feature is moved
into a dedicated sub-section of the TCF section.

Close gh-32490
2024-04-15 17:07:14 +02:00
Sam Brannen
afbce96fb7 Introduce getName() in SpEL's BeanReference
Closes gh-32640
2024-04-15 16:44:37 +02:00
Sam Brannen
3f34a13436 Polishing 2024-04-15 16:30:51 +02:00
Simon Baslé
fe83003324 Merge branch '6.1.x' 2024-04-15 14:21:51 +02:00
Simon Baslé
1e54916119 Ensure multipart data is deleted in WebFlux when connection terminates
Before this change temporary files would not consistently be deleted
when the connection which uploads the multipart files closes naturally.

This change uses the usingWhen Reactor operator to ensure that the
termination of the connection doesn't prevent individual file parts
from being deleted due to a cancellation signal.

Closes gh-31217
2024-04-15 14:20:48 +02:00
laterlaugh
5012843b12 Fix typos in comment and test
Closes gh-32628
2024-04-12 17:40:54 +02:00
Sam Brannen
b13963ee81 Reject private JUnit Jupiter lifecycle methods annotated with @⁠Autowired
Closes gh-32627
2024-04-12 14:27:38 +02:00
Sam Brannen
43cc18a5a1 Use literal monospace in SpEL templating section
Prior to this commit, the text `#{ }` was displayed as { } with a bright
green background.

This commit addresses this by making use of Asciidoc's literal monospace
feature: `+#{ }+`.
2024-04-11 14:00:46 +02:00
Brian Clozel
4d5536db21 Merge branch '6.1.x' 2024-04-11 11:33:16 +02:00
Brian Clozel
6e20af41bf Upgrade CI image to Java 23ea17 2024-04-11 11:32:48 +02:00
Brian Clozel
d99113661e Merge branch '6.1.x' 2024-04-11 11:24:58 +02:00
Spring Builds
c68c62b6c6 Next development version (v6.1.7-SNAPSHOT) 2024-04-11 08:26:17 +00:00
Brian Clozel
54dab45151 Merge branch '6.1.x' 2024-04-11 08:51:13 +02:00
Brian Clozel
494ed4e852 Refine UriComponentsBuilder parsing
This commit refines the expressions for the scheme, user info, host and
port parts of the URL in UriComponentsBuilder to better conform to
RFC 3986.

Fixes gh-32616
2024-04-11 08:49:11 +02:00
Stéphane Nicoll
2e3a923225 Polish 2024-04-11 08:45:26 +02:00
Juergen Hoeller
77c6f160fe Merge branch '6.1.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
#	spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java
2024-04-10 18:29:48 +02:00
Simon Baslé
2d33aac350 Improve Bean Overriding support, testing and documentation
This commit improves on the bean overriding feature in several ways:
the API is simplified and polished (metadata and processor contracts,
 etc...).

The commit also reworks infrastructure classes (context customizer,
test execution listener, BeanOverrideBeanFactoryPostProcessor, etc...).
Parsing of annotations is now fully stateless.

In order to avoid OverrideMetadata in bean definition and to make a
first step towards AOT support, the BeanOverrideBeanFactoryPostProcessor
now delegates to a BeanOverrideRegistrar to track classes to parse,
the metadata-related state as well as for the field injection methods
for tests.

Lastly, this commit increases the test coverage for the provided
annotations and adds integration tests and fixes a few `@TestBean`
issues.
2024-04-10 18:16:43 +02:00
Juergen Hoeller
39cd31613b Polishing 2024-04-10 18:06:32 +02:00
Sébastien Deleuze
711ddd1ac6 Merge branch '6.1.x' 2024-04-10 17:55:09 +02:00