Commit Graph

1217 Commits

Author SHA1 Message Date
Rossen Stoyanchev
1aa4e7c68d Merge branch '5.3.x' 2022-07-29 16:20:51 +03:00
Rossen Stoyanchev
2172b99fee Polishing contribution
Closes gh-28836
2022-07-29 15:24:17 +03:00
floriankirmaier
b6144e5682 Improve setting of WebSocket error status
See gh-28836
2022-07-29 15:07:15 +03:00
Arjen Poutsma
619f0e4266 Merge branch '5.3.x' 2022-07-28 14:24:25 +02:00
Arjen Poutsma
b8b54ee524 Ensure WebClient exceptions are serializable
Not all HttpHeaders implementations are serializable. This commit
ensures that WebClientRequestException and WebClientResponseException
are serializable, by copying any non-serializable HttpHeaders into a
new, serializable, instance.

Closes gh-28321
2022-07-28 14:09:11 +02:00
Arjen Poutsma
97ea8a6789 Copy HttpHeaders to ensure serializability
Not all HttpHeaders implementations are serializable. This commit
ensures that WebClientRequestException and WebClientResponseException
are serializable, by copying any non-serializable HttpHeaders into a
new, serializable, instance.

Closes gh-28321
2022-07-28 13:55:43 +02:00
Arjen Poutsma
db43425bf9 Javadoc 2022-07-14 15:24:47 +02:00
Arjen Poutsma
f145b53fc8 Use existing context path in DefaultServerRequestBuilder
Closes gh-28820
2022-07-14 15:24:44 +02:00
Arjen Poutsma
1e03b30d33 Use existing context path in DefaultServerRequestBuilder
Closes gh-28820
2022-07-14 15:10:31 +02:00
rstoyanchev
3badc47647 Polishing 2022-07-13 13:12:16 +01:00
Sam Brannen
d660f5f62f Fix Javadoc in ResponseEntityExceptionHandler 2022-07-13 12:22:03 +02:00
rstoyanchev
263811ecfa Add WebFlux equivalent of ResponseEntityExceptionHandler
Closes gh-28665
2022-07-13 10:58:48 +01:00
Sam Brannen
983c6e233f Merge branch '5.3.x'
# Conflicts:
#	spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
2022-07-12 12:01:27 +02:00
Sam Brannen
19704805fd Polish contribution
See gh-28790
2022-07-12 11:56:01 +02:00
Marc Wrobel
31c6965c7f Fix and improve Javadoc in spring-webflux
Closes gh-28790
2022-07-12 11:48:58 +02:00
rstoyanchev
0938909cd9 Switch to Reactor 2022.0.0 snapshots
See gh-28766
2022-07-06 11:58:28 +01:00
rstoyanchev
a575590c01 Merge branch '5.3.x' 2022-07-01 09:42:18 +01:00
rstoyanchev
058ce36402 Improve ExtendedWebExchangeDataBinder implementation
Close gh-28646
2022-07-01 03:23:32 +01:00
Vikey Chen
2afe560e41 Replace forEach with putAll
See gh-28646
2022-07-01 03:01:12 +01:00
Sébastien Deleuze
4ec3e1042a Add runtime hints for WebFlux
Closes gh-28701
2022-06-30 10:02:34 +02:00
rstoyanchev
b312eca391 Deprecate and set trailingSlash option to false
Closes gh-28552
2022-06-29 16:09:10 +01:00
rstoyanchev
24c46142c6 Add docs on exceptions for HTTP interface client
Closes gh-28533
2022-06-24 15:55:18 +01:00
rstoyanchev
a04e805d27 Expose status handler at WebClient.Builder level
See gh-28533
2022-06-24 13:58:57 +01:00
rstoyanchev
b72ee5f034 Add static factory methods to WebClientAdapter
Ideally one would pass WebClient directly to HttpServiceProxyFactory,
but two need to remain decoupled. This commit adds static, shortcut
methods to WebClientAdapter to create an HttpServiceProxyFactory, thus
eliminating the step to wrap the WebClient.
2022-06-24 09:55:21 +01:00
rstoyanchev
45ee7913bf Polishing ProblemDetail support
See gh-28665
2022-06-24 09:55:21 +01:00
Brian Clozel
0783f0762d Improve conditional requests support
Prior to this commit, Spring MVC and Spring WebFlux would not support
conditional requests with `If-Match` preconditions. As underlined in the
RFC9110 Section 13.1, those are related to the `If-None-Match`
conditions, but this time only performing requests if the resource
matches the given ETag.

This feature, and in general the `"*"` request Etag, are generally
useful to prevent "lost updates" when performing a POST/PUT request: we
want to ensure that we're updating a version with a known version or
create a new resource only if it doesn't exist already.

This commit adds `If-Match` conditional requests support and ensures
that both `If-Match` and `If-None-Match` work well with `"*"` request
ETags.

We can't rely on `checkNotModified(null)`, as the compiler can't decide
between method variants accepting an ETag `String` or a Last Modified
`long`. Instead, developers should use empty ETags `""` to signal that
no resource is known on the server side.

Closes gh-24881
2022-06-21 19:29:20 +02:00
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
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
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
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
78ab4d7118 Support content negotiation for RFC 7807
Closes gh-28189
2022-05-09 18:32:21 +01: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
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