Commit Graph

19930 Commits

Author SHA1 Message Date
Arjen Poutsma
ea85431ac5 Add error filter to WebClient integration test
This commit adds a `WebClient` integration test that shows how to use
`ExchangeFilterFunction`s for error handling purposes.

Issue: SPR-15403
2017-05-01 13:36:35 +02:00
Juergen Hoeller
057e388b6b Streamlined JAF dependencies (plus upgrade to Netty 4.1.10)
Issue: SPR-14908
2017-05-01 13:34:31 +02:00
Juergen Hoeller
12a95d8c68 Upgrade to RxJava 2.1
Issue: SPR-15497
2017-04-30 12:53:37 +02:00
Rossen Stoyanchev
c7338c70dc Support async wrappers for Principal and WebSession
Issue: SPR-15494
2017-04-28 16:03:41 -04:00
Rossen Stoyanchev
1292bb20f9 WebTestClient supports customer argument resolvers
Issue: SPR-15495
2017-04-28 15:04:43 -04:00
Sebastien Deleuze
f2caaa9195 Add @Request(Param/Part) support for multipart requests
Issue: SPR-14546
2017-04-28 17:02:46 +02:00
Sebastien Deleuze
4bfd04b3c5 Add multipart support to ServerWebExchange
Issue: SPR-14546
2017-04-28 16:42:23 +02:00
Sebastien Deleuze
8e272bc5b0 Expose ServerCodecConfigurer as a bean
With this commit, ServerCodecConfigurer is now exposed as a bean in
order to be provided to DefaultServerWebExchange via
WebHttpHandlerBuilder and HttpWebHandlerAdapter. This allows
DefaultServerWebExchange to get configured codecs for reading form or
multipart requests.

Issue: SPR-14546
2017-04-28 16:42:23 +02:00
Sebastien Deleuze
a712c19661 Add multipart support to WebFlux functional API
Issue: SPR-14546
2017-04-28 16:42:23 +02:00
Sebastien Deleuze
852dc84d38 Add MultipartHttpMessageWriter
This commit adds a reactive HttpMessageWriter that allows
to write multipart HTML forms with multipart/form-data
media type.

Issue: SPR-14546
2017-04-28 16:42:23 +02:00
Sebastien Deleuze
23e4dd6d3d Add reading reactive multipart request support
This commit introduces reactive multipart support by adding a new
MultipartHttpMessageReader interface (with default methods) and a
SynchronossMultipartHttpMessageReader implementation based on
the Synchronoss NIO Multipart implementation
(https://github.com/synchronoss/nio-multipart).

Issue: SPR-14546
2017-04-28 16:42:23 +02:00
Juergen Hoeller
7f1fa225fe Latest dependency updates (Groovy 2.4.11, RxJava 1.2.10, H2 1.4.195) 2017-04-28 12:06:55 +02:00
Stephane Nicoll
0f6704202d Merge pull request #1404 from jonathanborenstein:master
* pr/1404:
  Polish "Use Java 8 forEach method on Map"
  Use Java 8 forEach method on Map
2017-04-28 11:07:40 +02:00
Stephane Nicoll
1b9e12f52f Polish "Use Java 8 forEach method on Map"
Closes gh-1404
2017-04-28 11:07:08 +02:00
Jon Borenstein
13dc0cd828 Use Java 8 forEach method on Map 2017-04-28 11:07:08 +02:00
Juergen Hoeller
1ea54eb2c6 GenericFilterBean lazily initializes its default environment
Alignment with HttpServletBean; consistent use of EnvironmentCapable.

Issue: SPR-15469
2017-04-27 21:38:30 +02:00
Juergen Hoeller
04f0f137e6 Aligned exception message for httpOnly
Issue: SPR-15488
2017-04-27 21:32:11 +02:00
Juergen Hoeller
baa7b1c6c8 Simplified match condition checks
Issue: SPR-15477
2017-04-27 21:31:50 +02:00
Juergen Hoeller
17f274fd6a Debug log messages for value retrieval exceptions
Issue: SPR-15481
2017-04-27 21:31:39 +02:00
Andy Clement
c1edb3b5bd Enforce limit on classes loaded by Spel compiled expression loader
Until this change a single classloader was used to load
all compiled SpEL expressions. This meant in a context where an
expression was repeatedly flipping between compiled and interpreted
mode (which can happen if in MIXED mode compilation and changing
the context around the evaluation) the classloader would continually
load a new compiled version but not orphan the old compiled version.
This eventually uses up all the memory as the number of classes
is ever increasing.

With this change classloaders are used to load 100 compiled
expressions. The 101st will be loaded by a new one. Orphaning the
old classloader means if an expression is ever recompiled there
is more likely to be no anchored references left to the older
compiled form and it can be GC'd. In the MIXED situation above it
should help alleviate the problem of older classes never being
candidates for GC.

Issue: SPR-15460
2017-04-27 11:31:56 -07:00
Juergen Hoeller
cd95f34666 Merge pull request #1399 from dreis2211/SPR-15477
Optimize AntPathMatcher when checking for potential matches
2017-04-27 20:26:37 +02:00
Christoph Dreis
13b39521d8 Optimize AntPathMatcher when checking for potential matches
Issue: SPR-15477
2017-04-27 19:04:36 +02:00
Juergen Hoeller
d9bde0812f Merge pull request #1373 from lc-nyovchev/master
HttpOnly Cookie Result Matcher
2017-04-27 15:20:07 +02:00
nyo
e80de55929 Added httpOnly cookie ResultMatcher 2017-04-27 14:22:00 +02:00
Stephane Nicoll
547c4f69a4 Add getTargetDataSource to TransactionAwareCacheDecorator
Issue: SPR-15479
2017-04-27 11:34:10 +02:00
Stephane Nicoll
333e5c6b01 Polish 2017-04-27 11:29:14 +02:00
Juergen Hoeller
0479dc96c4 Correct attributeHasNoErrors message in ModelResultMatchers
Includes consistent name quoting and use of Java 8 lambdas.

Issue: SPR-15487
2017-04-26 21:32:50 +02:00
Sam Brannen
4b1e3df283 Clean up warnings in spring-test 2017-04-26 19:15:51 +02:00
Sam Brannen
c855182e03 Polishing 2017-04-26 18:59:43 +02:00
Juergen Hoeller
c668d9a473 Polishing 2017-04-26 18:20:19 +02:00
Juergen Hoeller
3daf626842 Defensive fallback for file system resolution in lastModified()
Issue: SPR-15485
2017-04-26 18:17:00 +02:00
Juergen Hoeller
8b50f887db Caching annotations on interface methods with CGLIB proxies
Issue: SPR-15271
2017-04-26 18:16:47 +02:00
Juergen Hoeller
6c43d14a77 Async annotations on interface methods with CGLIB proxies
Issue: SPR-14949
2017-04-26 18:16:40 +02:00
Juergen Hoeller
42d6d7ec4e Transaction annotations on interface methods with CGLIB proxies
Issue: SPR-14322
2017-04-26 18:16:31 +02:00
Arjen Poutsma
4a8c99c9ce Consistent handling of 4xx/5xx status codes in WebClient
This commit changes the handling of 4xx/5xx status codes in the
WebClient to the following simple rule: if there is no way for the user
to get the response status code, then a WebClientException is returned.
If there is a way to get to the status code, then we do not return an
exception.

Issue: SPR-15486
2017-04-26 17:50:59 +02:00
Arjen Poutsma
0e7d6fc4d1 Rename WebClient.ResponseSpec.bodyToEntity[List] to toEntity[List]
This commit renames `WebClient.ResponseSpec.bodyToEntity` to `toEntity`
and similarly renames `WebClient.ResponseSpec.bodyToEntityList` to
`toEntityList`. In both cases, the `body` prefix was dropped because the
return value contains more than the body.

Issue: SPR-15486
2017-04-26 17:50:59 +02:00
Oleg Zhurakousky
299b9d60fd SPR-15481 Fixed AnnotationUtils.getValue() operation
- Fixed AnnotationUtils.getValue() operation to ensure it re-throws AnnotationConfigurationException instead of swallowing it (as it is done in few other operations in AnnotationUtils)
- Added test
- Removed unnecessary '@SuppressWarnings("unchecked")'
2017-04-26 15:05:32 +02:00
Brian Clozel
2579dab209 Get XNIO as an undertow transitive dependency 2017-04-26 10:24:23 +02:00
Juergen Hoeller
140379fe7e Upgrade to Kotlin 1.1.2 GA 2017-04-26 09:48:35 +02:00
Rossen Stoyanchev
191bbc20dc StandaloneMockMvcBuilder allows custom HandlerMapping
Issue: SPR-15472
2017-04-25 17:23:20 -04:00
Rossen Stoyanchev
60442ec33d Revert build.gradle change committed by mistake 2017-04-25 16:34:07 -04:00
Rossen Stoyanchev
4f3db9b822 Disable Servlet async request timeout in WebFlux
Issue: SPR-15463
2017-04-25 16:28:25 -04:00
Juergen Hoeller
61a4eaf3cf Upgrade to Jackson 2.9 PR3
Issue: SPR-14925
2017-04-25 22:22:16 +02:00
Rossen Stoyanchev
6e71828a35 Add space before cookie attributes
According to RFC-6265 that there should be a space between the ; and
the attribute name, i.e. the header should be something like
name=value; Domain=localhost; HttpOnly rather than
name=value;Domain=localhost;HttpOnly

Issue: SPR-15225
2017-04-25 16:07:25 -04:00
Rossen Stoyanchev
abe3cfd8de Flux<String> + "application/json" renders as text
Spring MVC now treats Flux<String> + "application/json" as (serialized)
text to be written directly to the response as is. This is consistent
with the rendering of String + "application/json".

Issue: SPR-15456
2017-04-25 12:47:13 -04:00
Rossen Stoyanchev
c67b0d6507 Properly support ResponseEntity<Flux<T>> in Spring MVC
Issue: SPR-15478
2017-04-25 12:03:59 -04:00
Sebastien Deleuze
20718e682e Polishing 2017-04-25 12:16:11 +02:00
Arjen Poutsma
b9dbac7b2c Rename ServerResponse.BodyBuilder.body to syncBody
This commit renames the `body(Object)` on ServerResponse to
`syncBody(Object)`. The reason for this is that the original method
name clashed with the `body(Publisher)` method in the Kotlin extension.

The new name nicely reflects the synchronous nature of the method,
 making it less appealing than the `Publisher`-based `body` method.

Issue: SPR-15467
2017-04-25 11:33:47 +02:00
Sebastien Deleuze
6a1ce13ae2 Upgrade Kotlin to 1.1.2-eap-77 2017-04-25 11:00:16 +02:00
Stephane Nicoll
a38b03f669 Merge pull request #1398 from QBNemo:master
* pr/1398:
  Polish "Reuse constant in DispatcherServlet"
  Reuse constant in DispatcherServlet
2017-04-25 10:07:56 +02:00