Commit Graph

14136 Commits

Author SHA1 Message Date
Juergen Hoeller ab50f7b0d5 Merge pull request #1320 from dreis2211/SPR-15237
Use Class.getTypeName() where appropriate
2017-02-09 00:25:01 +01:00
Violeta Georgieva 706c72e1c7 Simplify the calculation of UndertowServerHttpRequest.uri 2017-02-08 16:55:58 -05:00
Rossen Stoyanchev 9efa976d31 Correct generic type in BodyExtractor for form data 2017-02-08 16:46:58 -05:00
Christoph Dreis 5cfa7e71bb Use Class.getTypeName() where appropriate
Issue: SPR-15237
2017-02-08 20:36:41 +01:00
Rossen Stoyanchev f2967467e0 Improve writing in mock reactive request and response
Before this change the write Publisher was saved and Mono.empty()
returned from the write metohd which did not properly implement
the write contract since no writing ("consuming") was done.

This can be a problem in some cases. For example the request may appear
to succeed even if the publisher produces an error later when
subscribed to later after request handling completes.

This commit introduces a writeHandler function in the mock request and
response. By default it "writes" by consuming the content immediately,
which allows it to return a Mono<Void> that properly reflects when
writing is done, and it also caches the data so it may be replayed
later for test assertions.

For streaming scenario a custom writeHandler may be registered which
allows the custom handling to determine how long to stream before
cancelling so request handling may complete.

Issue: SPR-14590
2017-02-07 21:57:38 -05:00
Andy Clement d41d28f8ce Fix compilation of SpEL elvis/ternary expressions
Without this fix the compiled version of elvis
actual behaved differently to the interpreted version
if the value being queried was an empty string. This
is now fixed. It also now correctly handles the
query value being a primitive and addresses the
findings of SPR-15192 where some type inferencing
logic was trying to be too clever, that code has
been deleted.

Issue: SPR-15192
2017-02-06 09:43:10 -08:00
Sebastien Deleuze fe05d35292 Polish SseIntegrationTests 2017-02-06 18:24:55 +01:00
Sebastien Deleuze 6b9b0230c4 Introduce JSON streaming support
This commit introduces JSON streaming support which
consists of serializing HTTP request with
application/stream+json media type as line delimited JSON.

It also optimize Flux serialization for application/json by
using flux.collectList() and a single Jackson invocation
instead of one call per element previous strategy.
This change result in a x4 throughput improvement
for collection with a lot of small elements.

Issues: SPR-15095, SPR-15104
2017-02-06 18:14:53 +01:00
Stephane Nicoll f128feb1cc Document candidates index mechanism
Issue: SPR-14711
2017-02-06 16:19:51 +01:00
Stephane Nicoll 2fe310806c Merge pull request #1292 from dbrimley:master
* pr/1292:
  Polish
  Polish contribution
  Honour ErrorHandler if `Cache.put` fails
2017-02-06 15:27:51 +01:00
Stephane Nicoll 85b20aa08a Polish 2017-02-06 15:27:38 +01:00
Stephane Nicoll 908261b136 Polish contribution
Closes gh-1292
Issue: SPR-15188
2017-02-06 15:27:38 +01:00
David Brimley 3476d10efa Honour ErrorHandler if `Cache.put` fails
This commit makes sure that the `ErrorHandler` is invoked if the cache
fails to put an element (be it in the main cache or the exception cache).

See gh-1292
Issue: SPR-15188
2017-02-06 15:27:38 +01:00
Arjen Poutsma 7796c4db14 Introduce RenderingResponse
This commit introduces the RenderingResponse, a template
rendering-specific subtype of ServerResponse that exposes model and
template data.
2017-02-03 11:25:48 +01:00
Stephane Nicoll 71cdd61b33 Merge pull request #1311 from grimreaper:patch-3
* pr/1311:
  Polish javadoc
2017-02-03 07:38:07 +01:00
Eitan Adler 59bba3763d Polish javadoc
Closes gh-1311
2017-02-03 07:36:53 +01:00
Stephane Nicoll 48e834dfd1 Update copyright header 2017-02-03 07:34:39 +01:00
Stephane Nicoll 7e40bd73be Merge pull request #1312 from grimreaper:patch-2
* pr/1312:
  Polish javadoc
2017-02-03 07:30:23 +01:00
Eitan Adler 938c6a2acd Polish javadoc
Closes gh-1312
2017-02-03 07:29:50 +01:00
Sebastien Deleuze 02c4aff4ce Upgrade to Kotlin 1.1.0-beta-38 2017-02-03 00:33:04 +01:00
Ryan Pickett 654e14a86a Fix Javadoc in UriComponentsBuilder 2017-02-02 17:29:20 -05:00
Rossen Stoyanchev 1466c82f53 Better support for overriding base URI in WebClient
The base URI is ignored for requests that include a host.

WebClient exposes UriBuilder (rather than UriBuilderFactory) for
per-request URI building based on the base URI. That provides
full control to add or replace components of the base URI.
2017-02-02 17:24:18 -05:00
Rossen Stoyanchev 82a34f4b24 Update WebClient builder
Leave only one static, no-arg build() method for access to a Builder.

URI-related preferences are now exposed on the builder itself.

Improve Javadoc with base URI examples.
2017-02-02 17:17:37 -05:00
Juergen Hoeller acf511ac0e Polishing 2017-02-02 20:11:06 +01:00
Juergen Hoeller 02195f5abf Support for read-only transactions through explicit SET TRANSACTION statement
Issue: SPR-15210
2017-02-02 20:06:28 +01:00
Juergen Hoeller 9b3131ffba Skip default Content-Length if Transfer-Encoding header has been set
Issue: SPR-15212
2017-02-02 20:01:10 +01:00
Juergen Hoeller e44533f4c2 ServletRequestMethodArgumentResolver validates argument type match
Issue: SPR-15214
2017-02-02 19:59:30 +01:00
Juergen Hoeller 0da964f0a7 MockHttpServletRequest returns empty BufferedReader in case of no content
Issue: SPR-15215
2017-02-02 19:55:42 +01:00
Juergen Hoeller c9b99daa74 SettableListenableFuture centralizes state in ListenableFutureTask subclass
Issue: SPR-15216
2017-02-02 19:54:08 +01:00
Juergen Hoeller ebaf6e1c24 Upgrade to Hibernate Validator 5.4 final (and Netty 4.1.8)
Issue: SPR-14998
2017-02-02 19:00:50 +01:00
Rossen Stoyanchev 7399956708 Rename classes and methods containing "WebReactive"
Issue: SPR-15190
2017-02-02 11:25:54 -05:00
Sebastien Deleuze 123ee5f2da Add WebClient create() and build() static methods 2017-02-02 11:36:45 +01:00
Rossen Stoyanchev 080a3d6a41 Replace use of "Spring MVC" in spring-webflux module
Issue: SPR-15190
2017-02-01 17:50:24 -05:00
Rossen Stoyanchev fafd2d20e1 Rename spring-web-reactive to spring-webflux
Issue: SPR-15190
2017-02-01 17:02:52 -05:00
Rossen Stoyanchev 81d1217976 Support for default headers and cookies
Issue: SPR-15208
2017-02-01 15:29:46 -05:00
Rossen Stoyanchev 3e8ac25342 Refactor WebClient builder options 2017-02-01 11:58:08 -05:00
Sebastien Deleuze 99deb387ed Add Kotlin WebClient extensions 2017-02-01 11:28:58 +01:00
Sebastien Deleuze 2c94ee2043 Polishing 2017-02-01 11:00:50 +01:00
Arjen Poutsma 52e87cb425 Rename WebClientOperations to WebClient
This commit makes the following changes:

 - Merge WebClient into ExchangeFunction. Static methods on WebClient
have been moved to the utility class ExchangeFunctions, similar to
RouterFunctions operates on the server side.

 - Renamed WebClientOperations to WebClient.

 - Renamed WebClientStrategies to ExchangeStrategies
2017-02-01 09:59:15 +01:00
Rossen Stoyanchev 60517b23e2 StompSession supports custom headers for UNSUBSCRIBE
Issue: SPR-15131
2017-01-31 17:55:53 -05:00
Rossen Stoyanchev 949bb55ef5 Refactor random port in spring-websocket
Remove the use of SocketUtils#findAvailableTcpPort in favor of letting
servers pick a dynamic port by specifying port 0.
2017-01-31 16:49:57 -05:00
Rossen Stoyanchev c79092f0f9 Refactor random port in reactive module tests
This commit removes the use of SocketUtils#findAvailableTcpPort in
favor of letting servers pick a dynamic port by specifying port 0.

This should make integration tests more stable because the port is
chosen at the place where it needs to be used. It gives servers a
chance to try to open a socket on some port and start using the socket
if successful.
2017-01-31 16:19:19 -05:00
Rossen Stoyanchev 1fb0b0b786 Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200
2017-01-31 15:04:24 -05:00
Rossen Stoyanchev 9142427c4d Add committed flag to ReactiveHttpOutputMessage
Issue: SPR-15135
2017-01-31 12:50:27 -05:00
Mario Arias c33ad15b28 Add Kotlin JDBC extensions
Issue: SPR-15158
2017-01-31 16:44:35 +01:00
Juergen Hoeller 9666fcc41d SettableListenableFuture consistently tracks cancellation state
Issue: SPR-15202
2017-01-31 15:57:52 +01:00
Juergen Hoeller 9b26fcd7d2 Refined assertion messages
Issue: SPR-15196
2017-01-31 15:56:39 +01:00
Juergen Hoeller f84907a1fc Polishing 2017-01-31 12:00:13 +01:00
Juergen Hoeller 9243a14794 Test for correct handling of multiple header values
Issue: SPR-15166
2017-01-31 11:59:41 +01:00
Juergen Hoeller 23aac2de8c Retain single-arg assert methods in deprecated form
Issue: SPR-15196
2017-01-31 09:27:55 +01:00