Commit Graph

21624 Commits

Author SHA1 Message Date
Brian Clozel
507d128e1d Fix RSocket API warning 2019-07-08 14:47:41 +02:00
Sebastien Deleuze
08a5196c3a Use elementClass and elementTypeRef consistently 2019-07-08 12:08:40 +02:00
Sebastien Deleuze
88d7fede36 Avoid shadowed RSocketRequester extensions
This commit renames RSocketRequester.RequestSpec data extension to
dataWithType to avoid shadowing issues and adds Publisher<T> and Flow<T>
variants to provide automatic reified type parameter resolution for
those types. It also makes RSocketRequester consistent with the
changes introduced via 2b4d6ce354 in WebFlux.
2019-07-08 12:08:26 +02:00
slawluc
4bced4682a Make RSocketRequester extensions reified
Extension functions need to use reified types to create
ParameterizedTypeReference.

Closes gh-23185
2019-07-08 10:49:44 +02:00
Sebastien Deleuze
2b4d6ce354 Add body methods with Object parameter to WebFlux
The commit deprecates syncBody(Object) in favor of body(Object)
which has the same behavior in ServerResponse, WebClient and
WebTestClient. It also adds body(Object, Class) and
body(Object, ParameterizedTypeReference) methods in order to support
any reactive type that can be adapted to a Publisher via
ReactiveAdapterRegistry. Related BodyInserters#fromProducer
methods are provided as well.

Shadowed Kotlin body<T>() extensions are deprecated in favor of
bodyWithType<T>() ones, including dedicated Publisher<T> and
Flow<T> variants. Coroutines extensions are adapted as well, and
body(Object) can now be used with suspending functions.

Closes gh-23212
2019-07-07 22:27:57 +02:00
Sam Brannen
0fbc9bf461 Fix broken Javadoc links 2019-07-07 19:50:34 +02:00
Lonre Wang
8bfc920ac5 Fix typo in data-access.adoc
Closes gh-23247
2019-07-07 19:11:50 +02:00
Sam Brannen
a3161dc533 Merge branch '5.1.x' 2019-07-07 18:43:27 +02:00
Sam Brannen
db8be50161 Support empty target request path in FlashMap
Prior to this commit, if the user configured an empty path for the
targetRequestPath property of a FlashMap, the FlashMapManager threw a
StringIndexOutOfBoundsException when saving the output FlashMap for the
next request.

This commit fixes this by skipping the decoding and normalization of an
empty target request path.

Fixes gh-23240
2019-07-07 18:38:26 +02:00
Sam Brannen
575027af24 Polishing 2019-07-07 16:34:15 +02:00
Sam Brannen
fae75cb238 Polish contribution
See gh-23237
2019-07-07 16:29:03 +02:00
Johnny Lim
6dcf390fa2 Rename PathPatternRouteMatcherTest to PathPatternRouteMatcherTests
Closes gh-23239
2019-07-07 16:28:09 +02:00
Сергей Цыпанов
9f81ffa5ae Use StringJoiner where possible to simplify String joining
Closes gh-23237
2019-07-07 16:19:01 +02:00
Sam Brannen
8f5b2b2231 Merge branch '5.1.x' 2019-07-07 14:49:34 +02:00
Sam Brannen
efab6eb55d Ignore empty entries when parsing MediaTypes and MimeTypes
Prior to Spring Framework 5.1.3, MimeTypeUtils.parseMimeTypes() and
MediaType.parseMediaTypes() ignored empty entries, but 5.1.3 introduced
a regression in that an empty entry -- for example, due to a trailing
comma in the list of media types in an HTTP Accept header -- would result
in a "406 Not Acceptable" response status.

This commit fixes this by filtering out empty entries before parsing
them into MimeType and MediaType instances. Empty entries are therefore
effectively ignored.

Fixes gh-23241
2019-07-07 12:39:46 +02:00
Sam Brannen
e57845a50f Polishing 2019-07-06 15:32:54 +02:00
Juergen Hoeller
a5cb8799fa Merge branch '5.1.x' 2019-07-05 18:22:02 +02:00
Juergen Hoeller
7a7d4109ac Polishing 2019-07-05 17:47:36 +02:00
Juergen Hoeller
53ebbb20f9 Upgrade to Netty 4.1.37 2019-07-05 17:08:46 +02:00
Juergen Hoeller
16deb3c50f Defensively register ReactiveReturnValueHandler for messaging methods
Closes gh-23207
2019-07-05 17:08:08 +02:00
Juergen Hoeller
a1eae42fd0 Expose implementation method for annotation introspection purposes
Closes gh-23210
2019-07-05 17:07:44 +02:00
Juergen Hoeller
56cc0d02e9 Bean destruction exceptions consistently logged at warn level
Closes gh-23200
2019-07-05 17:07:22 +02:00
Juergen Hoeller
aeef95938e SpringValidatorAdapter's ObjectError subclasses are serializable
Closes gh-23181
2019-07-05 17:07:01 +02:00
Juergen Hoeller
944b943ea7 Upgrade to Kotlin 1.3.41, Netty 4.1.37, Log4J 2.12, HSQLDB 2.5 2019-07-05 16:26:10 +02:00
Juergen Hoeller
d903b9acf5 Compatibility with RxJava 3.0
Closes gh-23208
2019-07-05 16:25:52 +02:00
Juergen Hoeller
6990504d17 Upgrade to ASM 7.2
Closes gh-23156
2019-07-05 16:24:45 +02:00
Juergen Hoeller
2abff1a5b0 Introduce withoutTransaction factory method on TransactionOperations
Closes gh-23198
2019-07-05 16:24:37 +02:00
Juergen Hoeller
7bfe01a028 Support for reactive result values from event listener methods
Closes gh-21831
2019-07-05 16:19:23 +02:00
Rossen Stoyanchev
97d020c509 Merge branch '5.1.x' 2019-07-05 10:55:49 +01:00
Rossen Stoyanchev
2aec175ccc Drain body after exception from applying onStatus
Closes gh-23230
2019-07-05 10:50:03 +01:00
Rossen Stoyanchev
2088a3d57b Document async requests with Spring MVC Test
Closes gh-19666
2019-07-05 10:30:02 +01:00
Rossen Stoyanchev
1f5f22213c Merge branch 'pr/23119'
Closes gh-23119
2019-07-05 09:03:15 +01:00
Rossen Stoyanchev
fbb72eff2e Polish 2019-07-05 09:02:24 +01:00
Dmytro Nosan
ea10ee5265 queryParam and replaceParam with List
See gh-23114
2019-07-05 09:02:24 +01:00
Rossen Stoyanchev
0d3e5db3ff Compare suffix patterns by length
Closes gh-23125
2019-07-05 07:36:35 +01:00
Rossen Stoyanchev
157df861f9 Do not warn also if cause is re-thrown
Closes gh-23233
2019-07-05 07:07:59 +01:00
Rossen Stoyanchev
37f9ce5cc9 Return 500 (not 406) if content-type was preset
If content-type is preset in the returned ResponseEntity, then any
failure to find a matching converter is a server error.

Closes gh-23205
2019-07-05 07:07:58 +01:00
Rossen Stoyanchev
3d913b8134 Merge branch '5.1.x' 2019-07-03 17:25:12 +01:00
Rossen Stoyanchev
4e6e47b726 Earlier detection of token authentication
Use a callback to detect token authentication (via inteceptor) thus
avoiding a potential race between that detection after the message is
sent on the inbound channel (via Executor) and the processing of the
CONNECTED frame returned from the broker on the outbound channel.

Closes gh-23160
2019-07-03 15:24:27 +01:00
Rossen Stoyanchev
5af9a8edae Ensure WebSocketHttpRequestHandler writes headers
Closes gh-23179
2019-07-03 15:24:27 +01:00
Rossen Stoyanchev
03a342378a Merge branch '5.1.x' 2019-07-02 09:43:58 +01:00
Rossen Stoyanchev
6e79dcdc8e Merge pull request #23070 from L00kian/23060-fix 2019-07-02 09:33:13 +01:00
Rossen Stoyanchev
29b7659094 Polish 2019-07-02 09:32:07 +01:00
Ilya Lukyanovich
27b5d2b288 Optional @RequestPart Mono arg resolves to Mono.empty
Closes gh-23060
2019-07-02 09:32:07 +01:00
Sam Brannen
64d13c471f Upgrade to JUnit Jupiter 5.5
Closes gh-23076
2019-07-01 00:00:09 +03:00
Phillip Webb
932f771380 Improve performance of FormContentFilter
Improve the performance of `FormContentFilter` by checking directly if
`contentType` is empty. This saves the need for an exception to thrown
then immediately caught.

Closes gh-23216
2019-06-29 22:31:11 -07:00
Phillip Webb
b3d56ebf3b Restore StringUtils.hasLength check
Update `MimeTypeUtils` so that the  StringUtils.hasLength check is
performed immediately on the incoming argument, rather than in
`parseMimeTypeInternal`. This restores the `IllegalArgumentException`
rather than the `NullPointerException` which is thrown by the
`ConcurrentHashMap`.

Closes gh-23215
See gh-23211
2019-06-29 22:31:11 -07:00
Thomas Girard
87c15ba9ad Use the accepted profiles in BeanDefinitionDsl
Closes gh-22393
2019-06-29 17:25:45 +02:00
Sam Brannen
ba95818b1d Upgrade to Gradle 5.5
Closes gh-23214
2019-06-29 11:54:19 +03:00
Sam Brannen
896496341a Add explicit support for multipart/mixed in FormHttpMessageConverter
Commit 5008423408 added support for
multipart/* media types in FormHttpMessageConverter, but users still had
to manually register multipart/mixed as a supported media type in order
to POST multipart data with that content type.

This commit removes the need to manually register multipart/mixed as a
supported media type by registering it automatically in
FormHttpMessageConverter. In addition, this commit introduces
MULTIPART_MIXED and MULTIPART_MIXED_VALUE constants in MediaType.

Closes gh-23209
2019-06-29 11:41:15 +03:00