Commit Graph

13542 Commits

Author SHA1 Message Date
Juergen Hoeller
dc8cd4e4c0 Polishing
Issue: SPR-14888
2016-11-08 17:26:59 +01:00
Juergen Hoeller
55afb59c7a Merge pull request #1233 from kazuki43zoo/SPR-14888
Detect invalid configuration for autoGrowCollectionLimit on DataBinder
2016-11-08 17:17:47 +01:00
Kazuki Shimizu
124f2128fa Detect invalid configuration for autoGrowCollectionLimit on DataBinder
Issue: SPR-14888
2016-11-09 01:00:27 +09:00
Juergen Hoeller
dda9762072 Moved WebExchangeDataBinder to web.bind.support (alongside WebRequestDataBinder)
Issue: SPR-14542
2016-11-08 11:01:58 +01:00
Juergen Hoeller
f0be79e0a1 Promoted BindingContext to web.reactive root (since HandlerResult requires it there)
Issue: SPR-14542
2016-11-08 09:33:49 +01:00
Sebastien Deleuze
99a8510ace Introduce HttpHeaders get/setContentDisposition()
This commit introduces a new ContentDisposition class designed
to parse and generate Content-Disposition header value as defined
in RFC 2183. It supports the disposition type and the name,
filename (or filename* when encoded according to RFC 5987) and
size parameters.

This new class is usually used thanks to
HttpHeaders#getContentDisposition() and
HttpHeaders#setContentDisposition(ContentDisposition).

Issue: SPR-14408
2016-11-08 01:12:23 +01:00
Juergen Hoeller
c44c607570 Consistent references to plain class names in exception messages
Issue: SPR-14883
2016-11-07 22:10:26 +01:00
Juergen Hoeller
b3cd1ad7f1 Refined throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
2016-11-07 19:03:18 +01:00
Juergen Hoeller
cf479bf893 Consistent throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
(cherry picked from commit b42d731)
2016-11-07 18:00:21 +01:00
Rossen Stoyanchev
1f128110f7 Merge reactive @ModelAttribute support 2016-11-07 15:04:45 +02:00
Rossen Stoyanchev
6b73700f74 Reactive support for @ModelAttribute methods
Issue: SPR-14542
2016-11-07 15:03:15 +02:00
Rossen Stoyanchev
e59dcedfee BindingResult inserted before rendering
Issue: SPR-14542
2016-11-07 15:03:15 +02:00
Rossen Stoyanchev
ae003e89c1 HandlerResult provides access to BindingContext
Issue: SPR-14542
2016-11-07 15:03:15 +02:00
Rossen Stoyanchev
6abd4d5ff5 Async model attributes resolved before rendering
Issue: SPR-14542
2016-11-07 15:03:15 +02:00
Rossen Stoyanchev
d163240ed4 Reactive support for Errors argument
Issue: SPR-14542
2016-11-07 15:02:13 +02:00
Rossen Stoyanchev
816e32872a Reactive support for @ModelAttribute argument
Issue: SPR-14542
2016-11-07 15:02:13 +02:00
Rossen Stoyanchev
3230ca6d39 Add ConcurrentModel
This commit adds a Model implementation based on ConcurrentHashMap for
use in Spring Web Reactive.

Issue: SPR-14542
2016-11-07 15:02:13 +02:00
Juergen Hoeller
9b57437b7a Polishing 2016-11-07 12:55:35 +01:00
Juergen Hoeller
7f4904ed22 Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 20:39:53 +01:00
Sebastien Deleuze
9b10541111 Upgrade to reactor-test 3.0.3.RELEASE 2016-11-04 20:12:00 +01:00
Sebastien Deleuze
b447d7dbe6 Rename expectErrorMatch() to expectErrorMatches() 2016-11-04 17:15:03 +01:00
Sebastien Deleuze
b338e6d7aa Rename expectErrorWith() to expectErrorMatch() 2016-11-04 16:14:09 +01:00
Juergen Hoeller
671c4e9650 Upgrade to Tiles 3.0.7 2016-11-04 15:01:14 +01:00
Juergen Hoeller
4936fe6088 Upgrade to OkHttp 3.4.2, RxJava 1.2.2 and Mockito 2.2.11 2016-11-04 14:22:22 +01:00
Juergen Hoeller
365ecd4cca Polishing 2016-11-04 14:14:31 +01:00
Juergen Hoeller
8df45dd274 @Async docs explicitly mention ListenableFuture and CompletableFuture
Issue: SPR-14881
2016-11-04 12:54:24 +01:00
Juergen Hoeller
cd398ed9e4 Upgrade to Joda-Time 2.9.5 2016-11-04 12:26:33 +01:00
Juergen Hoeller
17f5f86a54 Polishing 2016-11-04 12:25:38 +01:00
Juergen Hoeller
ac774cdcef Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 12:24:46 +01:00
Rossen Stoyanchev
475b876f08 Add ResponseEntity test 2016-11-04 13:18:53 +02:00
Rossen Stoyanchev
c430402872 Improve support for Mono<ResponseEntity<?>>
If the body class is not resolvable from the return type and there is
a body instance we now fall back on the class of the body instance.

Issue: SPR-14877
2016-11-04 12:51:00 +02:00
Juergen Hoeller
84d3808b3b Upgrade to Mockito 2.2
Issue: SPR-14880
2016-11-03 22:53:35 +01:00
Juergen Hoeller
8ae0bd6ea9 ApplicationListenerDetector ignores non-managed bean instances
Issue: SPR-14879
2016-11-03 22:52:43 +01:00
Brian Clozel
95abd18fea Fix Exception Handling result handler resolution
Prior to this commit, the wrong `HandlerResultHandler` could be
resolved when handling exceptions; this could happen only if the
original handler and exception handler had different signatures:

```
Publisher<String> originalHandler() { ... }

@ExceptionHandler(MyCustomException.class)
ResponseEntity<Mono<String>> handleException() { ... }
```

In that case, the `ResponseBodyResultHandler` would be used when
handling exceptions instead of the `ResponseEntityResultHandler`.

This commit ensures that the `HandlerResult` returned by the exception
handler is used to resolve the `HandlerResultHandler`. The latter will
process the result and use it to write to the HTTP response.

Issue: SPR-14876
2016-11-03 17:13:54 +01:00
Juergen Hoeller
a90e4b230f Polishing
Issue: SPR-14867
2016-11-03 14:41:41 +01:00
Juergen Hoeller
8053fefea8 Consistent support for early placeholder resolution in properties locations
Issue: SPR-10502
2016-11-03 14:33:48 +01:00
Juergen Hoeller
03468fd9ed ReloadableResourceBundleMessageSource sets file timestamp on merged holder
Issue: SPR-14583
2016-11-03 14:27:44 +01:00
Brian Clozel
0006957274 Support ResponseStatus on reactive controllers
This commit adds support for `@ResponseStatus` annotations on reactive
controller methods. `HandlerResultHandler`s implementations now
set the status on the `ServerWebExchange`, if and only if the
invocation of the controller method succeeded.

Issue: SPR-14830
2016-11-03 12:00:30 +01:00
Rossen Stoyanchev
87e01513fd Check SockJS session type
This commits adds a validation check whether the SockJS session type
matches the transport type and rejects requests for which they
don't match.

Issue: SPR-14867
2016-11-03 09:35:30 +02:00
Sebastien Deleuze
8705df502d Rename Verifier to StepVerifier
Issue: SPR-14800
2016-11-02 19:01:40 +01:00
Juergen Hoeller
bb0d4c8ce0 Upgrade to Selenium 3.0.1, HtmlUnit 2.23 and JSONAssert 1.4 2016-11-02 14:55:12 +01:00
Juergen Hoeller
be853d466b AnnotatedElementAdapter explicitly declares isAnnotationPresent method
Issue: SPR-14872
(cherry picked from commit 17863df)
2016-11-02 14:54:43 +01:00
Juergen Hoeller
dc9a8ee933 Upgrade to Caffeine 2.3.4 and XNIO 3.4.1 2016-11-02 13:48:06 +01:00
Juergen Hoeller
3e419cde7d Polishing
Issue: SPR-14863
2016-11-02 12:44:12 +01:00
Juergen Hoeller
82fa4ef274 Polishing
Issue: SPR-14863
2016-11-02 11:45:59 +01:00
Rossen Stoyanchev
388e173ba3 Fix NPE in custom @InitBinder resolver initialization
Issue: SPR-14869
2016-11-02 10:00:19 +02:00
Rossen Stoyanchev
6c098b3301 Polish 2016-11-02 09:53:27 +02:00
Sebastien Deleuze
b4b7c278df Update tests according to latest reactor-test changes
- ScriptedSubscriber has been renamed to Verifier
 - The Publisher is passed to create() instead of verify()
 - No more need to specify the generic type explicitly
 - Version is now sync with reactor-core

Issue: SPR-14800
2016-11-01 22:28:50 +01:00
Andy Clement
9000acd39d Rework compilation of OpNE/OpEQ SpEL operators
For SPR-14863 we need to adjust the code generation for OpNE
to use !x.equals(y) rather than x!=y. There are also further
cases in the equalityCheck() code in Operator that were not
being handled in the compilation case (when comparators are
used for example). This latter issue also affects OpEQ.

Rather than add yet more bytecode generation, both OpNE and
OpEQ generateCode() methods have been simplified. The
generated code now delegates to equalityCheck() in Operator
which is exactly what the interpreted case does.

This ensures that the compiled code continues to behave just
like the interpreted case. It ensures changes to the interpreted
case are automatically picked up for the compiled case. It
makes the bytecode generation simpler.

The benefit of compilation of SpEL expressions is to avoid
slow reflective calls - that doesn't apply for a basic
(in)equality test so there is no need to go crazy in bytecode
gen.

Issue: SPR-14863
2016-11-01 13:42:23 -07:00
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