Commit Graph

1543 Commits

Author SHA1 Message Date
rstoyanchev
933965b7b4 Merge branch '5.3.x' 2022-06-14 12:20:34 +01:00
rstoyanchev
52d0681ca1 WebMvc respects RouterFunction beans ordering
Closes gh-28595
2022-06-14 09:20:19 +01:00
Arjen Poutsma
216a266856 Polish 2022-06-08 17:00:58 +02:00
christophejan
bbabf8d855 Add minimal Kotlin DSL RouterFunction attributes support
Closes gh-28567
2022-06-08 16:49:46 +02:00
christophejan
5b1bda5c7c Add test case on nested RouterFunction attributes 2022-06-08 16:49:46 +02:00
Sam Brannen
df45c80bfe Merge branch '5.3.x' 2022-06-01 16:30:44 +02:00
Sam Brannen
cda1e5507c Polishing 2022-06-01 16:28:05 +02:00
Balázs Póka
1d5ffaf30a Always construct new exception on error in DefaultWebClient
Always construct new exception on error, otherwise memory leak may
occur due to repeated use of singleton exception.

Closes gh-28550
2022-06-01 16:07:41 +02:00
rstoyanchev
ff890bc1cc Support custom HTTP method for @HttpExchange
Closes gh-28504
2022-05-24 09:27:35 +01:00
rstoyanchev
48c1746693 Refactor HttpServiceProxyFactory for use as a bean
Closes gh-28505
2022-05-24 09:27:17 +01:00
rstoyanchev
496c1dcae1 Add RequestAttributeArgumentResolver
Closes gh-28458
2022-05-23 11:06:14 +01:00
rstoyanchev
f0e23b66f3 The "consumes" condition compares MediaType parameters
Closes gh-9257
2022-05-11 17:52:04 +01:00
Sam Brannen
eb50a6f4a0 Further polishing regarding JDK baseline upgrade
See gh-28440
2022-05-10 17:01:40 +02:00
Arjen Poutsma
5c5c89e9fe Merge branch '5.3.x' 2022-05-10 15:55:54 +02:00
Arjen Poutsma
e4ec376075 Disabling Undertow server in CoroutinesIntegrationTests 2022-05-10 15:55:00 +02:00
Sam Brannen
d44ba0a42b Consistent formatting 2022-05-10 13:12:11 +02:00
rstoyanchev
922636e85e Content decoding in client exceptions
Closes gh-28190
2022-05-10 11:48:46 +01:00
rstoyanchev
6b1a8452fa Polishing 2022-05-10 11:48:46 +01:00
Sam Brannen
d45b5f6e8a Merge branch '5.3.x'
# Conflicts:
#	spring-webflux/src/main/java/org/springframework/web/reactive/resource/VersionResourceResolver.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/resource/VersionResourceResolver.java
2022-05-10 11:44:14 +02:00
Sam Brannen
1c10cdd1e8 Update copyright dates
See gh-28433
2022-05-10 11:33:32 +02:00
evgeny.bovykin
941b92cbed Make inner classes static when feasible
A static nested class does not keep an implicit reference to its
enclosing instance.

This prevents a common cause of memory leaks and uses less memory per
instance of the class.

Closes gh-28433
2022-05-10 11:32:37 +02:00
rstoyanchev
8378af9e39 Polishing
See gh-28189
2022-05-09 19:01:10 +01:00
rstoyanchev
78ab4d7118 Support content negotiation for RFC 7807
Closes gh-28189
2022-05-09 18:32:21 +01:00
Sam Brannen
6c131ef9dc Merge branch '5.3.x' 2022-05-09 15:23:15 +02:00
Sam Brannen
a1c7380398 Add test for value attribute in @ModelAttribute in WebFlux
This complements the previous commit which tested only the `name`
attribute.

See gh-28423
2022-05-09 15:22:22 +02:00
rstoyanchev
5d0f49c2c8 Add WebInputException subclasses
Closes gh-28142
2022-05-09 09:52:15 +01:00
Sam Brannen
061d1263f8 Merge branch '5.3.x' 2022-05-07 17:24:50 +02:00
Sam Brannen
7dd622bdb2 Support name attribute in @ModelAttribute in WebFlux
Prior to this commit, the `name` attribute in @ModelAttribute was not
supported when using WebFlux. This is because MethodParameter was used
instead of SynthesizingMethodParameter when retrieving the
@ModelAttribute annotation. In other words, @AliasFor was not honored
because the annotation was not synthesized. Consequently, only the
`value` attribute was supported in WebFlux when specifying a custom name
via @ModelAttribute.

This commit fixes this by using SynthesizingMethodParameter to retrieve
the @ModelAttribute annotation.

Closes gh-28423
2022-05-07 17:16:26 +02:00
Sam Brannen
9b1c8a3a5c Fix broken ToStringVisitorTests
Tests were broken due to the switch to Set.of(...) in
2b65f274dc.
2022-05-07 16:45:46 +02:00
Sam Brannen
a69d9716c9 Merge branch '5.3.x' 2022-05-07 16:28:01 +02:00
Sam Brannen
64c96c579d Polish contribution
See gh-28422
2022-05-07 16:18:47 +02:00
Carlos Bouzón García
39e3876301 Fix BindingResult error when ModelAttribute has custom name in WebFlux
Closes gh-28422
2022-05-07 16:18:04 +02:00
Juergen Hoeller
2b65f274dc Use Set.of instead of HashSet with Arrays.asList 2022-05-06 16:19:27 +02:00
rstoyanchev
b4e6014a14 Merge branch '5.3.x' into main 2022-04-28 11:40:11 +01:00
rstoyanchev
b30f4d7bb7 Exposes all root causes to ExceptionHandler methods
Closes gh-28155
2022-04-28 04:04:57 +01:00
rstoyanchev
b1384ddafa Add HttpServiceProxyFactory builder
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
d7ab5b4132 Refactor HttpRequestSpec to HttpRequestValues
HttpRequestValues is immutable and exposes a builder.

See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
564f8ba7a0 Update after review
See gh-28386
2022-04-27 21:21:43 +01:00
rstoyanchev
c418768f05 Add @HttpRequest and HttpServiceProxyFactory
See gh-28386
2022-04-27 21:21:43 +01:00
Arjen Poutsma
be7fa3aaa8 Introduce PartEvent
This commit introduces the PartEvent API. PartEvents are either
- FormPartEvents, representing a form field, or
- FilePartEvents, representing a file upload.

The PartEventHttpMessageReader is a HttpMessageReader that splits
multipart data into a stream of PartEvents. Form fields generate one
FormPartEvent; file uploads produce at least one FilePartEvent. The last
element that makes up a particular part will have isLast set to true.

The PartEventHttpMessageWriter is a HttpMessageWriter that writes a
Publisher<PartEvent> to a outgoing HTTP message. This writer is
particularly useful for relaying a multipart request on the server.

Closes gh-28006
2022-04-20 11:00:07 +02:00
Sam Brannen
081c6463e9 Polish Javadoc for PathVariableMapMethodArgumentResolver 2022-04-16 17:57:44 +02:00
Sam Brannen
1574fed90b Merge branch '5.3.x' 2022-04-13 10:08:31 +02:00
Sam Brannen
a7cf19cec5 Improve documentation and matching algorithm in data binders 2022-04-13 09:55:40 +02:00
Arjen Poutsma
9adfa5e8b0 Add HEAD support in MVC/WebFlux Resource handling
This commit introduces explicit HEAD support in Spring
MVC's ResourceHttpRequestHandler and WebFlux's ResourceWebHandler,
adding just headers but no body.

Closes gh-28291
2022-04-07 13:51:21 +02:00
Arjen Poutsma
192f2becf6 Automatically clean up multipart temp files
This commit ensures that any resources created for multipart handling,
obtained via ServerWebExchange.getMultipartData(), are automatically
deleted after handling the completing the response.

Resource for parts obtained via BodyExtractors::toMultipartData and
BodyExtractors::toParts are not cleaned automatically, and
should be cleaned via Part::delete.

Closes gh-27633
2022-04-06 17:02:31 +02:00
rstoyanchev
aea39fdad3 Merge branch '5.3.x' into main 2022-04-01 17:57:48 +01:00
rstoyanchev
24cd3c1f4c Revert "Disable flaky integration tests for now"
This reverts commit 1627f57f1f in
preparation for fixing the root cause
2022-04-01 16:07:05 +01:00
Stephane Nicoll
9ea741364a Merge branch '5.3.x' 2022-03-31 09:47:29 +02:00
Stephane Nicoll
1627f57f1f Disable flaky integration tests for now 2022-03-31 09:46:36 +02:00
Sam Brannen
7a1421cb0f Suppress deprecation warnings in tests 2022-03-29 15:04:58 +02:00