Commit Graph

18930 Commits

Author SHA1 Message Date
Rossen Stoyanchev 030caea9cf Merge branch '5.1.x' 2019-06-21 14:15:26 +01:00
Rossen Stoyanchev 594c5806a6 Handle error in apply of writeFunction
Closes gh-23175
2019-06-21 14:15:14 +01:00
Sam Brannen 0e5a38591f Cache beanType in ControllerAdviceBean 2019-06-21 14:09:05 +03:00
Sam Brannen 2759b4b909 Avoid use of Stream API in ControllerAdviceBean 2019-06-21 13:49:49 +03:00
Sam Brannen d5554d5d8d Polish @ControllerAdvice and @RestControllerAdvice 2019-06-21 13:26:30 +03:00
Sam Brannen 2f4c97cbdb Merge branch '5.1.x' 2019-06-21 12:46:21 +03:00
Sam Brannen 97bfb75fbc Polish documentation for @ControllerAdvice in reference manual 2019-06-21 12:45:08 +03:00
Sam Brannen 1d2f8e5cc2 Merge branch '5.1.x' 2019-06-21 12:41:59 +03:00
Sam Brannen ad915f4a26 Document that Ordered is not supported for @ControllerAdvice beans
Closes gh-23172
2019-06-21 12:39:34 +03:00
Arjen Poutsma 92981ac9de Add Flux<Part> ServerRequest.parts()
This commit introduces Flux<Part> ServerRequest.parts() that delegates
to ServerWebExchange.getParts() and offers an alternative,
streaming way of accessing multipart data.

Closes gh-23131
2019-06-21 10:59:13 +02:00
Arjen Poutsma 11c7907a59 Add Flux<Part> ServerWebExchange.getParts()
This commit introduces ServerWebExchange.getParts(), as an alternative,
streaming way of accessing multipart data.
2019-06-21 10:59:12 +02:00
Arjen Poutsma edd86e5dd5 Move RouterFunction WebHandler to inner class 2019-06-21 10:59:12 +02:00
Rossen Stoyanchev 7f1d5d790e Polish 2019-06-21 06:51:59 +01:00
Rossen Stoyanchev c6a2c89408 Package refactoring in rsocket support
Create annotation.support sub-package and move handler code there. This
prepares for a future, functional handler (responder) variant and is
consistent with the package structure under simp.
2019-06-21 06:49:59 +01:00
Brian Clozel cc05608ae9 PathPattern does not use custom separator
Prior to this commit, `PathPattern::extractPathWithinMapping`
would always use the default path pattern separator `/` when extracting
the path within the pattern of a matched route.

This commit ensures that `PathPattern` uses the configured separator
when extracting the path within the matched mapping.

Fixes gh-23168
2019-06-20 20:27:22 +02:00
Brian Clozel 5787fc16fb PathPatternRouteMatcher should use custom separator
Prior to this commit, the `PathPatternRouteMatcher` would always use the
default path pattern separator when parsing incoming route strings to
`RouteMatcher.Route` instances.
When the `PathPatternRouteMatcher` is configured with a
`PathPatternParser` that has a custom separator (e.g., `.`), then the
matching algorithm can't match routes against parsed patterns.

This commit ensures that the route matcher uses the configured separator
at all times.

Fixes gh-23167
2019-06-20 20:23:04 +02:00
Sam Brannen f56c54dfc8 Polishing 2019-06-20 18:09:22 +03:00
Sebastien Deleuze da582dad7c Add documentation for Coroutines dependencies 2019-06-20 16:11:20 +02:00
Rossen Stoyanchev 772087fe18 Refactor RSocket handler selection
1. Consolidate config options for handler detection in the base class
AbstractMethodMessageHandler with sub-classes like RSocketMessageHandler
now only setting the handler predicate by default (e.g. @Controller).

2. Remove autoDetection flag in favor of just having the mutually
exclusive handler Predicate<Object> vs manually registered List<Object>.
Or if both are desired for some reason, then manually register first,
and set the predicate second.
2019-06-20 12:16:08 +01:00
Rossen Stoyanchev 7d68a65dc0 Replace deprecated methods in RSocket tests 2019-06-20 12:16:08 +01:00
Rossen Stoyanchev d6b5c20058 Generalize RSocketRequester data methods
Replace the Publisher argument in RequestSpec's
data(Publisher, Class<T>) and
data(Publisher, ParameterizedTypeReference<T>) methods with Object thus
allowing any reactive type known to the ReactiveAdapterRegistry to be
passed in directly rather than adapted to Publisher first.
2019-06-20 12:16:08 +01:00
Sam Brannen b3d40b3fac Upgrade to JUnit Jupiter 5.5 RC2
See gh-23076
2019-06-20 13:20:25 +03:00
Sam Brannen d2e6d0269b Preliminary tests for multipart/related & multipart/mixed in RestTemplate
See gh-23159
2019-06-20 11:35:18 +03:00
Sebastien Deleuze e86b937f8c Leverage new Kotlin script templating support
As of 1.3.40, Kotlin now provides a kotlin-scripting-jsr223-embeddable
dependency which:
 - Fixes classloading related issues
 - Provides out of the box JSR 223 support
 - Is compatible with Spring Boot Fat Jar mechanism

This commit updates Spring Framework tests and documentation accordingly.

Closes gh-23165
2019-06-20 10:17:02 +02:00
Sebastien Deleuze cfb4148982 Upgrade to Kotlin 1.3.40 2019-06-20 09:44:14 +02:00
Stephane Nicoll 521539b68e Merge pull request #23162 from izeye
* pr/23162:
  Polish FormattingConversionServiceTests

Closes gh-23162
2019-06-20 08:46:56 +02:00
Johnny Lim ef704aa531 Polish FormattingConversionServiceTests
See gh-23162
2019-06-20 08:40:47 +02:00
Stephane Nicoll 8e1612c68a Merge pull request #23158 from izeye
* pr/23158:
  Polish YamlProcessorTests.flattenedMapIsSameAsPropertiesButOrdered()

Closes gh-23158
2019-06-20 08:35:42 +02:00
Johnny Lim 77aa17fe75 Polish YamlProcessorTests.flattenedMapIsSameAsPropertiesButOrdered()
See gh-23158
2019-06-20 08:34:44 +02:00
Rossen Stoyanchev 22fd521e0a Remove MessageHandlerAcceptor sub-class
This commit removes the MessageHandlerAcceptor sub-class of
RSocketMessageHandler, and rather than implementing directly the
contracts for RSocket client and server acceptors, RSocketMessageHandler
now exposes clientAcceptor() and serverAcceptor() methods that return
the required adapter instances.

This provides better separation between the RSocketMessageHandler and
the RSocket adapter code, and also avoids implementing generic
interfaces like the BiFunction required for the client acceptor.
2019-06-19 22:19:19 +01:00
Sebastien Deleuze 341385acfc Merge branch '5.1.x' 2019-06-19 13:59:59 +02:00
Sebastien Deleuze bcad276adb Fix Jackson documentation broken links
Closes gh-23153
2019-06-19 13:59:36 +02:00
Rossen Stoyanchev 73c2eb1b77 Fix minor Assert-related issues 2019-06-18 21:31:44 +01:00
Sam Brannen ef6471fcbf Polish contribution
See gh-23141
2019-06-18 18:59:18 +03:00
RustyTheClone 72adc3d37e Support target type in MockMvcResultMatchers.jsonPath()
This commit introduces an overloaded jsonPath() method to specify a
target type to coerce into for MockMvcResultMatchers.

 - jsonPath(String, Matcher<T>, Class<T>)

Closes gh-23141
2019-06-18 18:57:27 +03:00
Sam Brannen 89ebdc766c Polishing 2019-06-18 18:53:47 +03:00
Sebastien Deleuze ea97fefa98 Merge branch '5.1.x' 2019-06-18 16:52:29 +02:00
Sebastien Deleuze bd568ea2f1 Document how to specify Jackson JSON view serialization hints
Closes gh-23150
2019-06-18 16:50:54 +02:00
Sam Brannen 4000b244ff Forbid null converters in RestTemplate & HttpMessageConverterExtractor
Prior to this commit, RestTemplate and HttpMessageConverterExtractor did
not validate that the supplied HttpMessageConverter list contained no
null elements, which can lead to a NullPointerException when the
converters are accessed.

This commit improves the user experience by failing immediately if the
supplied HttpMessageConverter list contains a null element. This applies
to constructors for RestTemplate and HttpMessageConverterExtractor as
well as to RestTemplate#setMessageConverters().

Note, however, that RestTemplate#getMessageConverters() returns a mutable
list. Thus, if a user modifies that list so that it contains null values,
that will still lead to a NullPointerException when the converters are
accessed.

This commit also introduces noNullElements() variants for collections in
org.springframework.util.Assert.

Closes gh-23151
2019-06-18 16:13:20 +03:00
Sam Brannen 8ceac9c015 Document supported @Transactional attributes in the TCF
This commit documents which attributes in @Transactional are supported
for test-managed transactions in the Spring TestContext Framework (TCF).

Closes gh-23149
2019-06-18 14:34:28 +03:00
Sam Brannen da903904c9 Fix Javadoc reference to MediaType#APPLICATION_CBOR_VALUE
{@value ...} cannot be used outside of the current type.
2019-06-18 13:00:00 +03:00
Sam Brannen aa0a8d66a8 Polishing 2019-06-18 10:19:03 +03:00
Johnny Lim 7f67cecd10 Polish MappingMediaTypeFileExtensionResolver.addFileExtension()
Closes gh-23145
2019-06-18 10:10:30 +03:00
Sam Brannen f6a4595cef Polishing 2019-06-17 17:06:37 +03:00
Stephane Nicoll 80c7f7f6ba Merge pull request #23142 from ielatif
* pr/23142:
  Fix typo

Closes gh-23142
2019-06-17 11:41:01 +02:00
Issam El-atif 57fa09b80d Fix typo
See gh-23142
2019-06-17 11:40:45 +02:00
Arjen Poutsma 30af01fd4e Use DataBufferUtils.write in DefaultFilePart.transferTo
This commit makes sure that in DefaultMultipartMessageReader's
DefaultFilePart, the file is not closed before all bytes are written,
by using DataBufferUtils.write (see c1b6885191d6a50347aeaa14da994f0db88f26fe).

The commit also improves on the logging of the
DefaultMultipartMessageReader.

Closes gh-23130
2019-06-14 14:13:18 +02:00
Arjen Poutsma f08656c6cb Add methods to read/write from Path to DataBufferUtils
This commit adds two methods to DataBufferUtils:
- one that reads a Flux<DataBuffer> from a Path
- one that writes a Flux<DataBuffer> to a Path
2019-06-14 14:13:18 +02:00
Sam Brannen 99d10a671c Merge branch '5.1.x' 2019-06-14 14:51:08 +03:00
Sam Brannen d18d4d865e Update Javadoc for HtmlUtils regarding Apache Commons Text
Closes gh-23122
2019-06-14 14:48:24 +03:00