Commit Graph

13493 Commits

Author SHA1 Message Date
Rossen Stoyanchev
99cacaa72d Improve reactive support for access to Principal
The method to access the Principal from the ServerWebExchange is now
a Mono<Principal> (rather than Optional<Principal>).

There is also support for Principal as a controller method argument.

Issue: SPR-14680, SPR-14865
2016-11-01 18:44:14 +02:00
Rossen Stoyanchev
e1a382b61f Polish 2016-11-01 18:15:11 +02:00
Juergen Hoeller
b07d40cc44 Polishing
(cherry picked from commit 77e00f1)
2016-10-31 20:56:00 +01:00
Rossen Stoyanchev
33dbbce182 ApplicationContext-based HttpHandler setup
This commit adds support for detecting the target WebHandler along with
WebFilters, WebExceptionHandlers, and other spring-web reactive
strategies in an ApplicationContext.

WebReactiveConfigurationSupport has @Bean factory methods for
DispatcherHandler and ResponseStatusExceptionHandler.

WebHttpHandlerBuilder has a static factory method that initializes the
builder from an ApplicationContext. This method is also used in the
DispatcherHandler#toHttpHandler(ApplicationContext) shortcut method.

Issue: SPR-14837
2016-10-31 20:45:26 +02:00
Juergen Hoeller
45fc449550 Polishing 2016-10-31 19:24:45 +01:00
Juergen Hoeller
eaf80781e8 Upgrade to H2 1.4.193 and Derby 10.13.1.1 2016-10-31 19:24:09 +01:00
Rossen Stoyanchev
3da0295c12 Support for reactive controller @InitBinder methods
Issue: SPR-14543
2016-10-31 16:11:44 +02:00
Rossen Stoyanchev
0b76b6d7e9 Sync semantics for WebExchangeDataBinder factory
The createBinder method in BindingContext now returns the binder
instance rather than a Mono with the expectation that binder
initialization (e.g. @InitBinder) does not require blocking.

Issue: SPR-14543
2016-10-31 16:11:44 +02:00
Rossen Stoyanchev
b55ab1119e Sync argument resolution and HandlerMethod invocation
HandlerMethodArgumentResolver is a non-blocking contract, however only
implementations that read the request body require blocking.

This commit introduces SyncMethodArgumentResolver as an extension of
the non-blocking contract that allows synchronous implementations to
use synchronous argument resolution.

There is also a SyncInvocableHandlerMethod extension that uses only
sync argument resolvers and allows a synchronous invocation.

Issue: SPR-14543
2016-10-31 16:11:44 +02:00
Juergen Hoeller
c4ee876416 Polishing 2016-10-31 12:45:41 +01:00
Juergen Hoeller
7f280a3b17 Polishing 2016-10-31 12:28:44 +01:00
Juergen Hoeller
61d7d1621b ASM-generated class names get interned for better memory allocation
Issue: SPR-14862
(cherry picked from commit d859826)
2016-10-31 12:28:29 +01:00
Juergen Hoeller
9659bc5fe7 ObjectToObjectConverter properly handles constructors on non-public classes
Issue: SPR-14304
2016-10-30 22:29:53 +01:00
Juergen Hoeller
ac80ac6f8b Consistent instanceof/casting of Class references 2016-10-30 21:40:27 +01:00
Juergen Hoeller
7627c38695 Exceptions thrown from @ExceptionHandler methods logged at warn level (instead of debug)
Issue: SPR-14861
2016-10-30 21:40:20 +01:00
Sebastien Deleuze
9ccffb6de5 Upgrade to RxJava 2.0.0 2016-10-29 16:38:35 +02:00
Stephane Nicoll
e3f6b61743 Polish 2016-10-29 11:15:26 +02:00
Stephane Nicoll
30291a8cd7 Allow to customize TestDispatcherServlet
This commit introduces the `DispatcherServletCustomizer` callback
interface that can be used to customize the `DispatcherServlet` that a
`MockMvc` is using.

Previously, only the `dispatchOptions` flag can be customized. This
commit allows to customize any property of `DispatcherServlet` before it
is initialized.

Issue: SPR-14277
2016-10-29 10:58:29 +02:00
Juergen Hoeller
c036e4019f Upgrade to Hibernate Validator 5.3.1 (and Gson 2.8) 2016-10-28 23:53:23 +02:00
Juergen Hoeller
2f9ed5917b Polishing 2016-10-28 23:49:21 +02:00
Juergen Hoeller
dc080cb1be Revised NoSuchBeanDefinitionException message and ResolvableType handling
Includes consistent quoting of qualified type names in related classes.

Issue: SPR-14831
2016-10-28 23:39:05 +02:00
Juergen Hoeller
36332441ae DefaultListableBeanFactory allows early type matching against ScopedProxyFactoryBean
Issue: SPR-14816
2016-10-28 23:37:58 +02:00
Juergen Hoeller
c946924431 ApplicationListener detection for inner beans behind post-processors
Issue: SPR-14783
2016-10-28 23:35:56 +02:00
Juergen Hoeller
5ac5ec1046 No external locking for singleton advice/aspect beans
Issue: SPR-14324
2016-10-28 23:35:01 +02:00
Juergen Hoeller
72e1f7e898 Avoid deadlock between SockJS heartbeat and XHR polling
Issue: SPR-14833
2016-10-28 23:34:19 +02:00
Juergen Hoeller
bf9083d60f TypeDescriptor supports merged annotation lookups (for composable formatting annotations)
Issue: SPR-14844
2016-10-28 23:33:26 +02:00
Juergen Hoeller
08972eff9b Local merged annotation lookup in SpringCacheAnnotationParser
Issue: SPR-14781
Issue: SPR-14801
2016-10-28 23:32:55 +02:00
Rossen Stoyanchev
00a35897fe ServerWebExchange provides access to form data
The ServerWebExchange now has a getFormData() method that delegates to
FormHttpMessageReader for the parsing and then caches the result so
it may be used multiples times during request processing.

Issue: SPR-14541
2016-10-28 22:58:31 +03:00
Rossen Stoyanchev
81b4dedd08 Polish form reader/writer 2016-10-28 21:29:02 +03:00
Sebastien Deleuze
46599e7d03 Add FormHttpMessageReader/Writer
Issue: SPR-14540
2016-10-28 19:08:01 +03:00
Rossen Stoyanchev
c3f22b7364 Add "mutate" builder to ServerWebExchange
This commit adds a default mutate method to ServerWebExchange which
prepares an immutable wrapper and returns the provided mutated
properties.
2016-10-28 19:05:05 +03:00
Rossen Stoyanchev
afcc120b97 Better handling for AsyncRequestTimeoutException
Avoid call to sendError when response is committed and log a short
error message instead.

Issue: SPR-14739
2016-10-28 17:45:30 +03:00
Sebastien Deleuze
b1030eba3f Fix JsonObjectDecoder chunks handling
Issue: SPR-14859
2016-10-28 16:44:53 +02:00
Sam Brannen
d59caaa2a7 Polishing 2016-10-28 16:37:33 +02:00
Sam Brannen
a04b6c5142 Clean up warnings in Gradle build 2016-10-28 16:25:29 +02:00
Juergen Hoeller
71d83388d4 Test for multi-character delimiter
Issue: SPR-14808
2016-10-28 15:37:10 +02:00
Juergen Hoeller
5912d6f52a LocalSessionFactoryBean clears default MetadataSources on reinitialization
Issue: SPR-14815
2016-10-28 15:35:04 +02:00
Juergen Hoeller
20419d72ef Tightened StringValueResolver contract
Issue: SPR-14842
2016-10-28 15:28:42 +02:00
Juergen Hoeller
13001b9aff SimpleApplicationEventMulticaster just swallows event downcast exceptions
Issue: SPR-14846
2016-10-28 15:25:22 +02:00
Juergen Hoeller
2874066a97 DataSourceTransactionManager triggers flush callbacks on registered transaction synchronizations
Issue: SPR-14847
2016-10-28 15:23:57 +02:00
Juergen Hoeller
e2b1dcbaca AccessorLValue reliably downcasts to CompilablePropertyAccessor in concurrent scenarios
Issue: SPR-14850
2016-10-28 15:15:38 +02:00
Juergen Hoeller
b7d3a969a4 ResourceHttpRequestHandler initializes PathExtensionContentNegotiationStrategy in afterPropertiesSet
Issue: SPR-14851
2016-10-28 15:13:37 +02:00
Juergen Hoeller
dbaafdd04e MessageChannel declares send(Message) as default method
Issue: SPR-14854
2016-10-28 15:11:03 +02:00
Sebastien Deleuze
37ce56fe96 Upgrade to Reactor Core 3.0.3 2016-10-28 14:42:21 +02:00
Arjen Poutsma
8f844461a0 Make HttpComponentsAsyncClientHttpRequest abortable
This commit aborts the HttpComponentsAsyncClientHttpRequest whenever the
returned Future is canceled.

Issue: SPR-14845
2016-10-28 14:19:15 +02:00
Arjen Poutsma
7b469f9c62 Improve WebClient error handling
This commit introduces two new `WebClient` methods: `retrieveMono` and
`retrieveFlux`, both of which offer direct access to the response body.
More importantly, these methods publish a WebClientException if the
response status code is in the 4xx or 5xx series.

Issue: SPR-14852
2016-10-28 13:15:29 +02:00
Arjen Poutsma
c96badc794 Add ExchangeFilterFunction.ofRequestProcessor and ofResponseProcessor 2016-10-28 09:05:07 +02:00
Sam Brannen
c448739b7b Remove mavenLocal as a repository in Gradle build 2016-10-28 00:36:44 +02:00
Juergen Hoeller
f1c20a8d31 Latest dependency updates (Hibernate ORM 5.2.4, Undertow 1.4.4, Jetty 9.4 RC1) 2016-10-27 17:42:38 +02:00
Juergen Hoeller
1b0b269370 DefaultServerResponseBuilder uses Reactor's new thenEmpty method (fixing deprecation error) 2016-10-27 17:41:33 +02:00