Commit Graph

13666 Commits

Author SHA1 Message Date
Brian Clozel 17089d607f Allow RedirectAttributes on ExceptionHandlers
Prior to this commit, `@ExceptionHandler` methods could not be injected
with `RedirectAttributes` arguments. This would make it impossible to
handle an error by redirecting to another view and add flashmap
attributes, to be included in the model when the next view is called.

Here is an example:

```
@ExceptionHandler(MyException.class)
public String handleException(MyException ex, RedirectAttributes
    redirectAttributes) {

  redirectAttributes.addFlashAttribute("errorMessage",
      "This is an error message");
  return "redirect:/";
}
```

This commit adds a new `RedirectAttributesMethodArgumentResolver`
instance in the list of pre-configured `HandlerMethodArgumentResolver`
in `ExceptionHandlerExceptionResolver`.

Issue: SPR-14651
2016-12-09 23:41:22 +01:00
Juergen Hoeller 547b9638dc Collection injection may refer back to factory methods on same bean again
Issue: SPR-14996
2016-12-09 23:09:10 +01:00
Juergen Hoeller aa29495d1d CommonsMultipartFile.getOriginalFilename() can be configured to preserve header-specified filename as-is
Issue: SPR-14613
2016-12-09 23:05:51 +01:00
Juergen Hoeller 39739b3157 Upgrade to Hibernate Validator 5.4 beta 1
Issue: SPR-14998
2016-12-09 15:22:24 +01:00
Juergen Hoeller 52799c0e3d Revised Jetty 9.3 vs 9.4 differentiation
Issue: SPR-14940
2016-12-09 15:21:31 +01:00
Juergen Hoeller 953bc189e7 Stronger explanation of default rollback rules
Issue: SPR-14994
2016-12-09 15:05:20 +01:00
Juergen Hoeller 7714eeccf3 MimeType parsing properly handles quoted semicolons
Issue:  SPR-14986
2016-12-09 15:04:26 +01:00
Juergen Hoeller a7ec6dc0af ImportRegistry properly tracks excluded superclasses
Issue: SPR-14972
2016-12-09 15:01:21 +01:00
Brian Clozel e1b89c7f65 Upgrade to Jetty 9.4.0.v20161208
Issue: SPR-14940
2016-12-09 09:13:01 +01:00
Brian Clozel 8d828dd16f Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 5.0 supports Jetty 9.3 and 9.4.

Issue: SPR-14940
2016-12-08 21:53:28 +01:00
Juergen Hoeller cf6a5835cc Polishing 2016-12-08 18:39:30 +01:00
Juergen Hoeller 313c89dd5c Overloaded methods with java.time.Instant/Duration parameters
Issue: SPR-14875
2016-12-08 18:34:00 +01:00
Juergen Hoeller 278a6250e6 Explicit support for retrieving enum values
Issue: SPR-14990
2016-12-08 18:30:25 +01:00
Juergen Hoeller ee30ce95fe HttpInvokerClientInterceptor propagates client-side Error as-is
Issue: SPR-14985
2016-12-08 18:29:41 +01:00
Juergen Hoeller 8ab977e7d1 Revised forClass argument names
Issue: SPR-14976
2016-12-08 18:28:03 +01:00
Juergen Hoeller 2f80b8485a JPA/Hibernate docs: transaction management, JTA setup
Issue: SPR-14957
2016-12-08 18:24:12 +01:00
Juergen Hoeller 05579fd1b9 SpEL docs: supported literals, null comparisons
Issue: SPR-14361
Issue: SPR-14987
2016-12-08 18:16:48 +01:00
Juergen Hoeller 6517c53768 Consistent use of "URI variables" terminology
Issue: SPR-14969
2016-12-08 18:11:21 +01:00
Rossen Stoyanchev 11ff03ed38 Merge pull request #1236 from dreis2211-stomp-header-encoding 2016-12-08 11:14:40 -05:00
Rossen Stoyanchev b3fa1b40a0 Synchronized updates of STOMP header key cache
Issue: SPR-14901
2016-12-08 11:13:57 -05:00
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