Commit Graph

18964 Commits

Author SHA1 Message Date
Sam Brannen
4e7d8a8873 Introduce addSupportedMediaType() in FormHttpMessageConverter
Closes gh-23203
2019-06-27 16:05:38 +03:00
Sam Brannen
8e1cb9a059 Improve diagnostics for all server failures in RestTemplateIntegrationTests 2019-06-27 14:16:19 +03:00
Sam Brannen
d522e9835f Polish AbstractMockWebServerTestCase 2019-06-27 13:45:32 +03:00
Sam Brannen
0b6239cecc Improve diagnostics for failures in RestTemplateIntegrationTests 2019-06-26 15:16:54 +03:00
Sam Brannen
7d6be2e26e Polishing 2019-06-26 15:12:32 +03:00
Stephane Maldini
14afdb2bbc Remove unnecessary import 2019-06-25 17:42:01 -07:00
Stephane Maldini
339ee01233 Remove unnecessary flushOnEach (since reactor-netty 0.9) 2019-06-25 16:05:30 -07:00
Sam Brannen
e947e08638 Merge branch '5.1.x' 2019-06-25 13:14:21 +03:00
Sam Brannen
ac29e9de6a Document that CacheManager.getCache() may create a new Cache
Prior to this commit, it was unclear that an invocation of getCache()
might potentially create a new Cache.

This commit updates the Javadoc to point out that concrete CacheManager
implementations may choose to create a new Cache at runtime if the Cache
does not already exist.

Closes gh-23193
2019-06-25 13:12:42 +03:00
Sam Brannen
33fa55e658 Update OrderComparatorTests based on clarified PriorityOrdered semantics
See gh-23187
2019-06-25 11:04:19 +03:00
Sam Brannen
b2dc4debde Merge branch '5.1.x' 2019-06-25 10:42:14 +03:00
Sam Brannen
dda4dfb44b Clarify semantics of the PriorityOrdered interface
This commit clarifies the semantics of the PriorityOrdered interface
with respect to sorting sets of objects containing both PriorityOrdered
and plain Ordered objects.

Closes gh-23187
2019-06-25 10:40:55 +03:00
Johnny Lim
1afc2be5aa Remove duplicate assertion in AnnotatedElementUtilsTests
Closes gh-23191
2019-06-25 10:00:12 +03:00
Sam Brannen
0f1d16bb05 Fix Checkstyle violation 2019-06-24 17:54:04 +03:00
Sam Brannen
d0231cb29a Presort beans in ControllerAdviceBean.findAnnotatedBeans()
Prior to this commit, all clients of
ControllerAdviceBean.findAnnotatedBeans() sorted the returned list
manually. In addition, clients within the core Spring Framework
unnecessarily used AnnotationAwareOrderComparator instead of
OrderComparator to sort the list.

This commit presorts the ControllerAdviceBean list using OrderComparator
directly within ControllerAdviceBean.findAnnotatedBeans().

Closes gh-23188
2019-06-24 16:26:11 +03:00
Brian Clozel
dd15ff79d7 Register annotated handlers in RSocketRequester
Prior to this commit, there would be no easy way to register client
RSocket handlers against an `RSocketRequester` instance. The only
solution was to gather all handlers and wrap them in a
`RSocketMessageHandler` and configure it as an acceptor on the client
RSocket.

This commit adds a convenience method on the `RSocketRequester` builder
to tkae care of this part of the infrastructure.

Closes gh-23170
2019-06-24 15:11:18 +02:00
Sam Brannen
d5a2bdee8d Improve Javadoc for @ControllerAdvice regarding ordering
Closes gh-23163
2019-06-24 14:36:04 +03:00
Sam Brannen
6cc6abd405 Test status quo for OrderComparator's PriorityOrdered support
See gh-23187
2019-06-24 14:13:46 +03:00
Sam Brannen
4357749a63 Document that OrderComparator honors PriorityOrdered
Prior to this commit, it was not clear that OrderComparator sorts
PriorityOrdered objects with higher priority than plain Ordered objects.
2019-06-24 13:32:54 +03:00
Sam Brannen
e3b3481c19 Fix typo in Javadoc 2019-06-24 12:32:41 +03:00
Sam Brannen
9239ab1891 Support Ordered interface for @ControllerAdvice beans
Closes gh-23163
2019-06-23 19:31:35 +03:00
Sam Brannen
978adbdae7 Avoid duplicate lookups of @ControllerAdvice annotations
See gh-23163
2019-06-23 18:31:04 +03:00
Gaurav Deshpande
ed6fbdddaa Fix typo in CONTRIBUTING.md
Closes gh-23180
2019-06-22 22:34:05 +03:00
Sam Brannen
7576d0d40c Polishing
See gh-23163
2019-06-22 19:06:58 +03:00
Sam Brannen
4568edf6c4 Simplify ControllerAdviceBean constructors
See gh-23163
2019-06-22 19:02:49 +03:00
Sam Brannen
8f30639a0a Test status quo for Ordered support for @ControllerAdvice beans
See gh-23163
2019-06-22 18:18:57 +03:00
Juergen Hoeller
e2d01bb783 Merge branch '5.1.x' 2019-06-22 17:11:31 +02:00
Juergen Hoeller
29dcd19971 Upgrade to AspectJ 1.9.4, RxJava 2.2.10, Jetty 9.4.19, Undertow 2.0.22
Includes Hibernate Validator 6.0.17 and renames "withoutJclOverSlf4j".
2019-06-22 16:49:40 +02:00
Sam Brannen
21267e56b7 Cache resolved bean instance in ControllerAdviceBean
Prior to this commit, the resolveBean() method in ControllerAdviceBean
looked up the @ControllerAdvice bean instance in the ApplicationContext
by name for every web request that involved lookups for global methods
annotated with @ExceptionHandler, @InitBinder, and @ModelAttribute.

This commit avoids the need for such repeated lookups in the
ApplicationContext by caching the resolved @ControllerAdvice bean
instance within ControllerAdviceBean once it has been resolved.
2019-06-21 18:27:33 +03:00
Sam Brannen
59901592d2 Introduce regression tests for ControllerAdviceBean
This commit introduces unit tests for the status quo in
ControllerAdviceBeanTests to serve as regression tests for future
changes to ControllerAdviceBean.
2019-06-21 17:21:50 +03:00
Sam Brannen
52f1a3aef9 Polish ControllerAdviceBean 2019-06-21 17:11:12 +03:00
Sam Brannen
beb454a299 Use HTTPS links in documentation where possible 2019-06-21 16:51:44 +03:00
Sebastien Deleuze
eaecf0c006 Improve RSocketRequester.ResponseSpec Kotlin extensions
This commit adds retrieveMono and retrieveFlux reified variants, and
turns dataFlow(flow: Flow) extension into a general purpose reified
data(producer: Any) one.

Closes gh-23164
2019-06-21 15:26:12 +02:00
Rossen Stoyanchev
003247dc40 Equalize copy of ChannelSendOperator
See gh-23175
2019-06-21 14:16:44 +01:00
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