Commit Graph

14848 Commits

Author SHA1 Message Date
Sebastien Deleuze
12d7b78169 Refactor reactive type conversion support
This commit replaces Reactive Streams converters for RxJava1 and
CompletableFuture with Reactor specific ones. The results in conversion
that preserves stream semantics, i.e. Mono vs Flux.

For example this is allowed:
Flux -> Observable
Mono -> Single
Mono -> CompletableFuture

This is not allowed:
Flux -> Single
Mono -> Observable
Flux -> CompletableFuture

As a result it is now possible to check through the ConversionService
if a target type to convert to is a stream of many or of one which is
useful for decoding purposes.

The commit also adds PublisherToFluxConverter to allow conversion from
raw Publisher to Flux. The reverse is not necessary since Flux is a
Publisher and it's a no-op conversion.
2016-07-01 17:41:37 -04:00
Juergen Hoeller
498d896ef0 Upgrade to WebJars Locator 0.32 2016-07-01 15:16:19 +02:00
Stephane Nicoll
037746da44 Polish
Closes gh-1097
2016-07-01 14:26:48 +02:00
Juergen Hoeller
d7184d1ad8 Latest dependency updates (HttpAsyncClient 4.1.2, HtmlUnit 2.22, Selenium 2.53.1, JOpt Simple 5.0.2) 2016-07-01 14:12:46 +02:00
Juergen Hoeller
1c73664c40 Defensively access deprecated AbstractHttpClient class from Apache HttpComponents
Issue: SPR-14422
2016-07-01 14:11:26 +02:00
Sam Brannen
8389e3fc35 Suppress warnings in Gradle build 2016-07-01 13:08:39 +02:00
Juergen Hoeller
a530a1c7f2 Upgrade to Hibernate ORM 5.2.1
Issue: SPR-14327
2016-07-01 12:57:24 +02:00
Stephane Nicoll
716273df47 Polish
Closes gh-967
2016-07-01 11:15:32 +02:00
Stephane Nicoll
49d78b4835 Merge pull request #1089 from nkjackzhang:patch-2
* pr/1089:
  Polish
  Fix typo in asciidoc
2016-07-01 11:00:08 +02:00
Stephane Nicoll
cac58738c9 Polish
Closes gh-1089
2016-07-01 10:58:15 +02:00
nkjackzhang
66fd86be33 Fix typo in asciidoc
See gh-1089
2016-07-01 10:47:06 +02:00
Stephane Nicoll
d9993243b6 Polish
Closes gh-1096
2016-07-01 10:43:54 +02:00
Stephane Nicoll
d35709dfbc Merge pull request #1095 from nkjackzhang:patch-4
* pr/1095:
  Polish contribution
  Fix typo in javadoc
2016-07-01 10:41:07 +02:00
Stephane Nicoll
2b822d5053 Polish contribution
Closes gh-1095
2016-07-01 10:40:54 +02:00
nkjackzhang
60123b6ca3 Fix typo in javadoc
See gh-1095
2016-07-01 10:40:15 +02:00
Juergen Hoeller
5c6f57ba78 Upgrade to EhCache 3.1 and Jetty 9.3.10 2016-06-30 22:25:18 +02:00
Rossen Stoyanchev
952395192f Collapse core.codec and core.codec.support into one 2016-06-30 16:12:36 -04:00
Rossen Stoyanchev
2f2546c8a4 Simplify initialization of WebSession Mono
The DefaultWebSessionManager now uses Mono.defer to protect the call
to getSession from parsing session cookies immediately. This allows
pre-initializing the Mono<WebSession> upfront vs using a lock.
2016-06-30 16:00:49 -04:00
Rossen Stoyanchev
4e2802338a Add MockWebSessionManager 2016-06-30 15:53:58 -04:00
Juergen Hoeller
dda0942c78 Polishing 2016-06-30 21:39:51 +02:00
Juergen Hoeller
66ec1c1618 Add missing package-info files for common packages
Issue: SPR-14420
2016-06-30 21:39:06 +02:00
Rossen Stoyanchev
43a1ea6bac Remove class checked in by mistake 2016-06-30 14:10:15 -04:00
Rossen Stoyanchev
39253b314a Fix tests by moving JAXB2 types back into sub-package 2016-06-30 14:09:09 -04:00
Rossen Stoyanchev
6d089cdc08 Move remaining JAXB2 test files from core to http 2016-06-30 13:48:41 -04:00
Rossen Stoyanchev
9c29ed75f8 Suppress OPTIONS handling for an ERROR dispatch
Issue: SPR-14410
2016-06-30 12:34:54 -04:00
Sebastien Deleuze
b115f1885d Move JSON and XML codecs to org.springframework.http.codec 2016-06-30 17:01:50 +02:00
Sebastien Deleuze
8d654584a8 Make JsonObjectDecoder package private 2016-06-30 16:30:16 +02:00
Arjen Poutsma
3403a6ca38 Merge pull request #127 from violetagg/ondataavailable-state
AbstractRequestBodyPublisher.onDataAvailable improvement
2016-06-30 16:07:01 +02:00
Violeta Georgieva
ea18e73803 AbstractRequestBodyPublisher.onDataAvailable improvement
When in state DATA_AVAILABLE if there are simultaneous invocations of
AbstractRequestBodyPublisher.RequestBodySubscription.request and
ReadListener.onDataAvailable, the first one will process the available
data, the second one should not throw an exception because thus it will
signal to web container that there are problems while there are not.
2016-06-30 16:56:15 +03:00
Arjen Poutsma
1d48e7c5b9 Allow to set response status on Undertow
Refactored Undertow support to register a response listener only when
the body is written to, as opposed to registering it at startup. The
reason for this is that getting the response channel from the
HttpServerExchange commits the status and response, making it impossible
to change them after the fact.

Fixed issue #119.
2016-06-30 15:27:08 +02:00
Juergen Hoeller
16949941f8 MatchableHandlerMapping extends HandlerMapping and lives in web.servlet.handler now
Issue: SPR-14321
2016-06-30 14:38:26 +02:00
Juergen Hoeller
232cfe5e98 Polishing 2016-06-30 14:03:28 +02:00
Juergen Hoeller
c4c941c43f Convert comma-separated string into list of classes analogous to existing support for class array
Issue: SPR-14415
2016-06-30 14:02:51 +02:00
Arjen Poutsma
2418ff0ad4 Merge pull request #126 from violetagg/onwritepossible-state
Make AbstractResponseBodySubscriber.onWritePossible thread-safe
2016-06-30 11:07:50 +02:00
Violeta Georgieva
e545b20289 Make AbstractResponseBodySubscriber.onWritePossible thread-safe
When there are simultaneous invocations of onWritePossible, only the
first one should succeed. This can happens when
AbstractResponseBodySubscriber.onNext and
WriteListener.onWritePossible() are called respectively by the
application and the web container.
2016-06-30 11:59:38 +03:00
Rossen Stoyanchev
e9d8152ab2 Port fix for SPR-14397
This is a port of the following commit, adapted for Java 8+:
89396ff01f
2016-06-29 17:34:45 -04:00
Rossen Stoyanchev
89396ff01f Refactor handleNoMatch for @RequestMapping
Originally handleNoMatch looked for partial matches based on URL
pattern, HTTP method, consumes, produces, and params in that order
but without narrowing down the set of partial matches resulting in
potentially inaccruate response status codes

Commit 473de0 added an improvement to narrow the set with partial
matches for URL pattern and HTTP method matches.

This commit overhauls handleNoMatch so that the narrowing down of
matches happens at each stage resulting in more accurate error
reporting for request mappings with fine-grained conditions.

Issue: SPR-14397
2016-06-29 15:59:00 -04:00
Stephane Nicoll
eba873067c Better hide lazy resolution of JMS payloads
This commit fixes MessagingMessageConverter to no longer expose the lazy
message resolution algorithm. This restores proper behaviour for
converters used outside of that context.

Instead, such arrangement is now private to
AbstractAdaptableMessageListener (as it should).

Issue: SPR-14389
2016-06-29 18:10:34 +02:00
Rossen Stoyanchev
478b4149f7 Add netty-buffer as a compile dependency
This is a temporary measure for M1 as the dependency will go away once
issue #116 is addressed.
2016-06-29 12:04:51 -04:00
Juergen Hoeller
2d5496df2b Polishing 2016-06-29 15:53:46 +02:00
Sebastien Deleuze
76baf85cfb Polish JacksonJsonDecoder 2016-06-29 14:22:21 +02:00
Juergen Hoeller
f2328e8e3c Polishing 2016-06-29 10:57:16 +02:00
Juergen Hoeller
1d42009c0a Deprecated getPropertyAsClass and refined PropertySourcesPropertyResolver's logging
Issue: SPR-14370
2016-06-29 10:51:06 +02:00
Juergen Hoeller
37e42e68e8 Refined AspectJ caching tests
Issue: SPR-14413
2016-06-29 10:43:54 +02:00
Juergen Hoeller
772bc030ee BasicAuthorizationInterceptor belongs to http.client.support
Issue: SPR-14412
2016-06-29 10:41:18 +02:00
Sebastien Deleuze
1f2fbba89b Make JsonObjectDecoder mandatory in JacksonJsonDecoder 2016-06-29 10:34:46 +02:00
Arjen Poutsma
92821d9300 Merge pull request #123 from violetagg/onsubscribe-state
Make AbstractResponseBodySubscriber.onSubscribe thread-safe
2016-06-29 09:51:30 +02:00
Violeta Georgieva
0605c0f3be Make AbstractResponseBodySubscriber.onSubscribe thread-safe
When there are simultaneous invocations of onSubscribe, only the first one should succeed, the rest should cancel the provided subscriptions
2016-06-29 10:47:23 +03:00
Stephane Nicoll
6cd85ddde7 Align caching AspectJ configuration
The `CacheResolver` and `ErrorHandler` features introduced in 4.1 were
not properly enabled in AspectJ mode. This commit adds more tests from
the regular proxy-based mode and align the AspectJ caching configuration.

Issue: SPR-14413
2016-06-29 09:21:59 +02:00
Rossen Stoyanchev
775ffbe10b Improve static resource path check 2016-06-28 16:46:51 -04:00