Commit Graph

13646 Commits

Author SHA1 Message Date
Christoph Dreis
9b76dc2ab4 SPR-14901 Allow customization of STOMP message header encoding
Fixes SPR-14901
2016-12-08 11:13:56 -05:00
Sebastien Deleuze
2735cba4b3 Append "data:" after line breaks for SSE JSON data fields
Issue: SPR-14899
2016-12-08 11:19:46 +01:00
bedrin
8315a4033f Add consumes attribute to @GetMapping
Issue: SPR-14988
2016-12-07 17:45:43 -05:00
Rossen Stoyanchev
1b0e95d7d8 Support for RequestUpgradeStrategy + Lifecycle
Issue: SPR-15527
2016-12-07 17:03:56 -05:00
Sebastien Deleuze
24b3614063 Add a 8 Kb flush threshold to RxNettyServerHttpResponse
Issue: SPR-14991
2016-12-07 11:13:45 +01:00
Brian Clozel
856cb3b964 Revert "Upgrade to Jetty 9.4.0.RC3"
This reverts commit 472126c0b2.
2016-12-07 11:02:37 +01:00
Brian Clozel
472126c0b2 Upgrade to Jetty 9.4.0.RC3
Issue: SPR-14940
2016-12-07 10:23:53 +01:00
Brian Clozel
ec8391a7fb Fix Netty4ClientHttpRequestFactory POST/PUT requests
This commit ensures that POST/PUT requests sent by the Netty client have
a Content-Length header set.

Integration tests have been refactored to use mockwebserver instead of
Jetty and have been parameterized to run on all available supported
clients.

Issue: SPR-14860
2016-12-07 09:23:53 +01:00
Rossen Stoyanchev
2c2de82ffb Flush after each WebSocket message by default
Issue: SPR-14527
2016-12-06 17:08:30 -05:00
Rossen Stoyanchev
c097c0284a Reactor Netty WebSocket server-side support
Issue: SPR-14527
2016-12-06 17:08:30 -05:00
Rossen Stoyanchev
46f2aafdc0 Extract Netty WebSocket session + adapter base classes
Issue: SPR-14527
2016-12-06 17:08:30 -05:00
Arjen Poutsma
30bd3d8736 Allow use of WebFilters in RouterFunction
This commit changes RouterFunctions.toHttpHandler to return
HttpWebHandlerAdapter (instead of HttpHandler), so that WebFilters and
WebExceptionHandler can be applied to it.

Issue: SPR-14979
2016-12-06 17:12:40 +01:00
Arjen Poutsma
9e72033036 Add WebClient.filter method
This commit introduces a new method on WebClient: filter, which takes an
filter function, and returns a (filtered) WebClient.

Issue: SPR-14961
2016-12-06 13:03:58 +01:00
Arjen Poutsma
079eca9f63 Add status code check to bodyTo[Mono|Flux]
- Add 4xx/5xx status code check to ClientResponse.bodyToMono and bodyToFlux.
- Removed WebClient.retrieveMono and retrieveFlux.

Issue: SPR-14977
2016-12-06 09:29:21 +01:00
Rossen Stoyanchev
953f7d40cf Filter out hanging tests realted to Reactor Netty
Issue: SPR-14975
2016-12-05 16:03:12 -05:00
Rossen Stoyanchev
0e20360bf9 Merge pull request #1254 from fdesu/fix/reactor-netty-tcp-client-update
ChannelFutureMono renamed to FutureMono
2016-12-04 20:22:59 -05:00
Sergei Ustimenko
e4ed1f6ffd ChannelFutureMono renamed to FutureMono
In the latest reactor-netty there is renaming
of ChannelFutureMono class to FutureMono. Thus
build fails on the latest master.
2016-12-03 18:56:42 +01:00
Rossen Stoyanchev
55d4268448 ReactiveAdapterRegistry is a bean 2016-12-02 20:41:39 -05:00
Drummond Dawson
c9abd99f44 Add twice() to ExpectedCount as convenience method 2016-12-02 16:27:57 -05:00
Nicklas Holm
9a7028ad0d Javadoc fix 2016-12-02 16:22:25 -05:00
Rossen Stoyanchev
8ad95b09e8 ReactiveContext and BindStatus in spring-web-reactive
Issue: SPR-14533
2016-12-02 11:48:54 -05:00
Arjen Poutsma
136b33bc4a Allow serving static files from RouterFunctions
This commit adds the ability to serve Resources (static files) through a
RouterFunction. Two methods have been added to RouterFunctions: one that
exposes a given directory given a path pattern, and a generic method
that requires a lookup function.

Issue: SPR-14913
2016-12-02 15:47:26 +01:00
Sebastien Deleuze
20c60650ee Upgrade to RxJava 2.0.2 2016-12-02 14:45:21 +01:00
Juergen Hoeller
1039fa1d34 Avoid defensive check for Servlet 3.1 Part interface
Issue: SPR-14467
2016-12-01 20:11:54 +01:00
Juergen Hoeller
f6fc0a86b3 Polishing
(cherry picked from commit 0028b29)
2016-12-01 20:11:47 +01:00
Sebastien Deleuze
300f2cd2dd Polish RedirectView
Issue: SPR-14534
2016-12-01 17:27:29 +01:00
Juergen Hoeller
7a8ec4f6eb Consistent use of "URI variables" terminology
Issue: SPR-14969
2016-12-01 12:30:10 +01:00
Rossen Stoyanchev
d41d3aa1d6 Merge pull request #1250 from origin/update-stomp-reactor-netty 2016-11-30 21:17:51 -05:00
Rossen Stoyanchev
b874692452 Simplify ReactorNettyTcpClient input
Create a ReactorNettyCodec to hold the decoding and encoding function
and consumer along with a package-private sub-class that delegates to
StompDecoder and StompEncoder.

Issue: SPR-14531
2016-11-30 21:17:04 -05:00
Rossen Stoyanchev
85c93f5d67 Polish Reactor Netty TCP client support 2016-11-30 21:17:04 -05:00
Stephane Maldini
870f61fd8e update STOMP support to reactor-netty 2016-11-30 21:17:04 -05:00
Juergen Hoeller
845dbf040d Test injection point match for narrow target return type
Issue: SPR-14960
2016-11-30 23:47:32 +01:00
Juergen Hoeller
1ae17c27df Efficient ISO_LOCAL_* variants for printing LocalDate/LocalTime/LocalDateTime
Issue: SPR-14958
2016-11-30 23:41:00 +01:00
Juergen Hoeller
5458a427a1 Polishing 2016-11-30 22:31:47 +01:00
Juergen Hoeller
01868096a3 Consistent catching of Throwable for introspection failures
Issue: SPR-12889
2016-11-30 22:24:14 +01:00
Juergen Hoeller
f6b8b84df9 Efficient type plus annotation comparisons during converter retrieval
Issue: SPR-14926
Issue: SPR-12926
2016-11-30 22:22:44 +01:00
Juergen Hoeller
ac5933a7ac Various DefaultListableBeanFactory clarifications
* getBeanDefinitionNames defensively returns a copy of the bean definition names array.
* copyConfigurationFrom provides an independent AutowireCandidateResolver instance and copies a ConversionService and dependency comparator configuration as well.
* findAutowireCandidates only considers a self reference fallback for direct dependency declarations, not as a collection element.

Issue: SPR-14897
Issue: SPR-14921
Issue: SPR-14965
2016-11-30 22:07:55 +01:00
Juergen Hoeller
2f9a775a8e Upgrade to JUnit 5.0 M3
Issue: SPR-14924
2016-11-30 15:12:00 +01:00
Juergen Hoeller
8cb7e026e2 HttpRequestPathHelper in new web.server.support package
In general, web.util is supposed to remain lowest-level, not depending on any other web.* package. Since web.client also has a support package, a corresponding web.server.support package seemed appropriate for a helper class depending on ServerWebExchange in web.server itself.
2016-11-30 11:12:06 +01:00
Rossen Stoyanchev
93cfc791a7 Spring MVC supports ResponseStatusException
The ResponseStatusException is now also supported in Spring MVC
through the ResponseStatusExceptionResolver.

Issue: SPR-14895
2016-11-29 15:18:02 -05:00
Rossen Stoyanchev
729551f375 Use full package names in ReactiveAdapterRegistry
The recent refactoring lead to
java.lang.NoClassDefFoundError: io/reactivex/Completable

where only RxJava 1 is in the classpath. Most likely due to the
lack of prefix in Completable::complete with rx package to avoid
the RxJava 2 reference.
2016-11-29 13:29:49 -05:00
Juergen Hoeller
10d5926b1a Direct use of Bean Definition 1.1 ExecutableValidator
Issue: SPR-13481
2016-11-29 18:09:13 +01:00
Juergen Hoeller
f065589a37 Avoid defensive casts against Java 8 default methods
Issue: SPR-13188
2016-11-29 18:07:46 +01:00
Brian Clozel
3bd17175ed Update with new HttpServerResponse.sendFile signature
Reactor Netty's `HttpServerResponse` has a new `sendFile` signature that
takes a `Path` instead of a `File`.
2016-11-29 14:29:39 +01:00
Rossen Stoyanchev
38b6746d3d HtmlUnitRequestBuilder detects form encoding type
Issue: SPR-14916
2016-11-28 18:07:40 -05:00
Rossen Stoyanchev
cb50f6bc8c ResponseEntity headers builder casts body to any type
Issue: SPR-14939
2016-11-28 17:22:24 -05:00
Rossen Stoyanchev
a203b74d20 PayloadArgumentResolver has useDefaultResolution flag
Issue: SPR-14937
2016-11-28 17:00:22 -05:00
Rossen Stoyanchev
122334c37a RxNettyWebSocketSession creates PONG frame correctly 2016-11-28 16:48:31 -05:00
Sebastien Deleuze
2e994f7dc3 Add RedirectView to Spring Web Reactive
Main differences with the Spring MVC original implementation:
 - Default redirect HTTP code is 303 See Other since we can assume
   all HTTP clients support HTTP 1.1 in 2016
 - No more http10Compatible property, use statusCode instead
 - By default the redirect is relative to the context path
 - A builder allow to set various properties if needed
 - In UrlBasedViewResolver, a Function<String, RedirectView>
   redirectViewProvider property allows to customize RedirectView
   instances in a flexible way

Issue: SPR-14534
2016-11-28 19:23:42 +01:00
Rossen Stoyanchev
25b95efad9 Shared ReactiveAdapterRegistry in web reactive config 2016-11-28 12:54:48 -05:00