Commit Graph

14277 Commits

Author SHA1 Message Date
Rossen Stoyanchev
f36e3d4a0d Support for mutating ServerWebExchange in WebTestClient
This commit adds a common base class for server-less setup with the
option to configure a transformation function on the
ServerWebExchange for every request.

The transformation is applied through a WebFilter. As a result the
RouterFunction setup is now invoked behind a DispatcherHandler with
a HandlerMapping + HandlerAdapter.

Issue: SPR-15250
2017-03-10 17:04:11 -05:00
Rossen Stoyanchev
1c9d4deba2 Add methods to prepend WebFilter + WebExceptionHandler 2017-03-10 17:04:11 -05:00
Rossen Stoyanchev
2cd6240dab Polish WebHttpHandlerBuilder 2017-03-10 17:04:11 -05:00
Brian Clozel
b799013567 Update to Reactor Aluminium SNAPSHOT
Currently the BOM versions are:

* reactor-core 3.0.6.BUILD-SNAPSHOT
* reactor-netty 0.6.2.BUILD-SNAPSHOT

This commit fixes as well a few deprecations in reactor-core.
2017-03-10 15:20:40 +01:00
Sebastien Deleuze
c8635de34e Tune Gradle config to avoid Kotlin Runtime library warning 2017-03-10 14:47:05 +01:00
Sebastien Deleuze
9963c4a495 Fix Kotlin warnings 2017-03-10 10:35:30 +01:00
Rossen Stoyanchev
813d3efe61 ExchangeResult refactoring in WebTestClient
The WebTestClient API no longer provides access to a base
ExchangeResult without a decoded response body.

Instead the response has to be decoded first and tests can then
access the EntityExchangeResult and FluxExchangeResult sub-types.
2017-03-09 17:40:56 -05:00
Arjen Poutsma
63118c1ea7 Add DataBufferUtils.read w/ AsynchFileChannel
This commit adds an overloaded DataBufferUtils.read method that operates
on a AsynchronousFileChannel (as opposed to a ReadableByteChannel, which
already existed). This commit also uses said method in the Resource
encoders, if the Resource is a file.
2017-03-09 14:08:40 +01:00
Sebastien Deleuze
e4b1a953bf Fix a typo in spring-context-indexer documentation 2017-03-09 10:28:14 +01:00
Rossen Stoyanchev
a1c24d2122 SSE reader support to read full content as a String
The SSE reader is ordered ahead of StringDecoder because with
response.decodeToFlux(String.class) we actually want the SSE reader
to get involved first based on the content-type.

At the same time with response.decodeToMono(String.class) there is
nothing the SSE reader can do while the StringDecoder could read the
entore content as one String, as long as the server does terminate
the stream which can happen in a testing scenario.

This commit updates ServerSentEventHttpMessageReader#readMono in
to support String.class by delegating to StringDecoder. Since
reading to a Mono is an explicit choice there is not much possibility
for interfering with decoding to Flux.

Issue: SPR-15331
2017-03-08 17:13:40 -05:00
Rossen Stoyanchev
8c36d3c4d9 Refactor use of DataBufferFactory in SSE reader
This commit simplifies the use of DataBufferFactory in the SSE reader
which is used only to wrap a byte[] as a DataBuffer. There is no actual
benefit to use anything other than a DefaultDataBufferFactory.
2017-03-08 16:56:37 -05:00
Rossen Stoyanchev
9aa25c3982 Polish ServerSentEventHttpMessageReader 2017-03-08 16:38:58 -05:00
Rossen Stoyanchev
d57d3efc89 Polish default config for ExchangeStrategies
Add default readers and writers from separate methods instead of
having them interleaved which is hard to read and easy to miss.

Issue: SPR-15331
2017-03-08 14:33:44 -05:00
Rossen Stoyanchev
84d11e9c17 Update Javadoc on exception resolvers in MVC config
Issue: SPR-15324
2017-03-07 20:50:10 -05:00
Rossen Stoyanchev
f5804b40b2 Fix typo in docs 2017-03-07 20:37:52 -05:00
Juergen Hoeller
cea3a078b2 Upgrade to RxJava 2.0.7 2017-03-07 15:43:02 +01:00
Juergen Hoeller
94a7624c1f Polishing 2017-03-07 15:42:04 +01:00
Juergen Hoeller
f30c498162 Retrieve newly created attribute from underlying request (marking it for update)
Issue: SPR-15300
2017-03-07 15:41:23 +01:00
Juergen Hoeller
fc2e635c05 Lookup methods work on configuration classes as well
Issue: SPR-15316
2017-03-07 13:51:43 +01:00
Juergen Hoeller
8b741508a6 Explicit notes on transaction phase processing
Issue: SPR-15323
2017-03-07 13:50:01 +01:00
Juergen Hoeller
9aaed2bcef Polishing 2017-03-07 11:02:26 +01:00
Juergen Hoeller
2f85cbf0d9 Upgrade to Protobuf 3.2 and JRuby 9.1.8 2017-03-07 11:01:59 +01:00
Juergen Hoeller
0d7b25f324 Upgrade to CGLIB 3.2.5
Issue: SPR-15147
2017-03-07 00:51:36 +01:00
Juergen Hoeller
eeb01db888 Support for new ServletContext methods in Servlet 4.0 b03
Issue: SPR-12674
2017-03-06 21:42:41 +01:00
Juergen Hoeller
e61e8d5062 Upgrade to HtmlUnit 2.25 and Jackson 2.9 PR1
Includes Log4J 2.8.1 and Selenium 3.2 as well.

Issue: SPR-15319
2017-03-06 17:54:28 +01:00
Juergen Hoeller
47c4cf7abf Drop support for Jetty 9.3 and OkHttp 2.x
Issue: SPR-15038
2017-03-06 17:54:02 +01:00
Rossen Stoyanchev
37726f4214 Improved annnotation support in ResolvableMethod 2017-03-06 09:19:57 -05:00
Rossen Stoyanchev
0296d003af Improved generics support in ResolvableMethod 2017-03-06 09:19:57 -05:00
Arjen Poutsma
c5351fdbef Add WebFlux fn reference documentation
Added WebFlux fn documentation, as a separate document for now.
2017-03-06 11:20:25 +01:00
Stephane Nicoll
33c4a71b08 Merge pull request #1349 from aviskarBasnet:doc-fix
* pr/1349:
  Polish contribution
  Polish doc
2017-03-05 09:34:32 +01:00
Stephane Nicoll
6bd4c88371 Polish contribution
Closes gh-1349
2017-03-05 09:33:57 +01:00
Aviskar Basnet
bf040c3dc1 Polish doc
See gh-1349
2017-03-05 09:31:16 +01:00
Rossen Stoyanchev
cdf19d1db1 @RequestParam tests use ResolvableMethod 2017-03-03 23:43:01 -05:00
Rossen Stoyanchev
6950cc0e64 Move ResolvableMethod
From spring-webflux to spring-web test sources since it is perfectly
usable for testing Spring MVC annotation method support.

Potentially to be promoted further up for use in any module that has
annotation method support. It has spring-core dependencies only
2017-03-03 22:12:33 -05:00
Rossen Stoyanchev
8ed22394cf Refactor ResolvableMethod 2017-03-03 22:12:28 -05:00
Stephane Nicoll
e38854a72f Merge pull request #1343 from nkjackzhang:patch-6
* pr/1343:
  Update copyright header
  Remove unecessary "<<"
2017-03-03 09:29:46 +01:00
Stephane Nicoll
05787f314f Update copyright header
Closes gh-1343
2017-03-03 09:28:56 +01:00
nkjackzhang
0e49c0e152 Remove unecessary "<<"
See gh-1343
2017-03-03 09:28:17 +01:00
Rossen Stoyanchev
ce69855274 Fix failing tests 2017-03-02 11:13:47 -05:00
Rossen Stoyanchev
ccb2c6530e Support for @ControllerAdvice in WebFlux
Issue: SPR-15132
2017-03-02 03:30:34 -05:00
Rossen Stoyanchev
24034447f6 Polish ExceptionHandler initialization
In preparation for SPR-15132
2017-03-01 18:08:41 -05:00
Rossen Stoyanchev
d8b150e83d Refactor BindingContext initialization
In preparation for SPR-15132.

Turn the BindingContextFactory into ModelInitializer (both package
private) since creating BindingContext itself is quite simple.

The ModelInitializer also has only one field and no need to be aware
of fields the RequestMappingHandlerAdapter.
2017-03-01 18:08:41 -05:00
Rossen Stoyanchev
c1086f4114 Polish BindingContext
In preparation for SPR-15132.
2017-03-01 18:08:41 -05:00
Juergen Hoeller
eb47f4c4e2 Upgrade to EhCache 3.3 and SLF4J 1.7.24 2017-03-01 22:51:46 +01:00
Sebastien Deleuze
ad3dafef4f Upgrade to Kotlin 1.1.0
Issue: SPR-15301
2017-03-01 15:17:32 +01:00
Juergen Hoeller
2b3fb2f5cc Polishing 2017-02-28 18:37:33 +01:00
Arjen Poutsma
56d669f849 Add permanent/temporary redirect to ServerResponse
This commit adds the temporaryRedirect(URI) and permanentRedirect(URI)
static creation methods to ServerResponse.
2017-02-28 15:47:19 +01:00
Juergen Hoeller
6556b40c2b Upgrade to SnakeYAML 1.18 (with updated duplicate key tests)
Includes updates to Caffeine 2.4, Jetty 9.4.2, Undertow 1.4.11, RxJava 1.2.7 and Groovy 2.4.9.
2017-02-28 13:19:33 +01:00
Juergen Hoeller
6d6cf01a42 Polishing 2017-02-28 13:13:23 +01:00
Juergen Hoeller
d003f6614b Tests for annotation lookups in interfaces (currently ignored for CGLIB proxies)
Issue: SPR-15271
Issue: SPR-14949
Issue: SPR-14322
2017-02-28 13:11:15 +01:00