Commit Graph

12598 Commits

Author SHA1 Message Date
Juergen Hoeller 8662c61a17 Polishing
(cherry picked from commit 154ef8b)
2016-12-20 20:14:25 +01:00
Juergen Hoeller 935671ae32 Defensively catch any exception from match attempts (for compatibility with AspectJ 1.8.10)
Issue: SPR-15019
(cherry picked from commit 97ea22c)
2016-12-20 12:25:30 +01:00
Juergen Hoeller a5ce965d22 ConfigurationClassPostProcessor programmatically registers unified ImportAwareBeanPostProcessor
Issue: SPR-14931
(cherry picked from commit f6b2a21)
2016-12-20 12:25:22 +01:00
Juergen Hoeller 1e58c80fe7 MBeanExporter silently ignores null beans
Issue: SPR-15031
(cherry picked from commit 9c55d22)
2016-12-19 16:57:48 +01:00
Juergen Hoeller a92ae4ba30 Fixed backport gaps 2016-12-19 02:09:05 +01:00
Juergen Hoeller b5f2e56e38 Polishing 2016-12-19 01:51:57 +01:00
Juergen Hoeller 594f4d56b8 RestTemplate provides patchForObject operations
Issue: SPR-14857
2016-12-19 01:51:47 +01:00
Juergen Hoeller 2d83ca61e7 JdbcTemplate consistently delegates to getColumnMapRowMapper
Issue: SPR-15018
2016-12-19 01:49:58 +01:00
Juergen Hoeller 307e37a69f Flexible setMessageCodesResolver and deprecated setExtractOldValueForEditor at DataBinder level
Issue: SPR-15009
2016-12-19 01:49:38 +01:00
Juergen Hoeller 8310eb3b1f Latest dependency updates (OkHttp 3.5, Jackson 2.8.5, Jetty 9.3.14, Tomcat 8.5.9) 2016-12-19 01:49:12 +01:00
Juergen Hoeller b9c4f1fa95 ResolvableType-based matching respects generic factory method return type
Includes consistent use of ResolvableType.resolve() wherever applicable.

Issue: SPR-15011
(cherry picked from commit 4c005e6)
2016-12-19 01:12:14 +01:00
Juergen Hoeller faab4f9e28 Consistent DeferredResultHandler invocation outside of result lock
Issue: SPR-14978
(cherry picked from commit 37c734e)
2016-12-19 01:10:38 +01:00
Juergen Hoeller 271b0abc45 LocaleContextHolder provides support for framework-level default settings
Issue: SPR-15017
(cherry picked from commit 23f0418)
2016-12-19 01:10:09 +01:00
Juergen Hoeller f0c3d50408 Defensively catch IllegalStateException from match attempts (for compatibility with AspectJ 1.8.10)
Issue: SPR-15019
(cherry picked from commit 3370f41)
2016-12-19 01:09:36 +01:00
Juergen Hoeller f0fdff1f07 OkHttpClientHttpRequestFactory allows POST request without body
Issue: SPR-15015
(cherry picked from commit 2954385)
2016-12-19 01:09:06 +01:00
Juergen Hoeller d15df3489e Avoid proxy replacement for generic return type signatures
Issue: SPR-15010
(cherry picked from commit 6d1cae2)
2016-12-19 01:04:00 +01:00
Juergen Hoeller f3cc4ab09d @RequestBody supports java.util.Optional
Issue: SPR-15007
(cherry picked from commit eeb7ae5)
2016-12-19 01:03:18 +01:00
Juergen Hoeller 442d8a68a6 TypeDescriptor properly narrows ResolvableType for non-typed collection elements
Issue: SPR-14971
(cherry picked from commit aef1460)
2016-12-19 01:02:18 +01:00
Juergen Hoeller 934fffec68 AutowiredAnnotationBeanPostProcessor tolerates annotated no-arg constructors
Issue: SPR-15005
(cherry picked from commit 8b5ee4e)
2016-12-19 01:01:59 +01:00
Juergen Hoeller 8190e7838f SQLErrorCodesFactory provides unregisterDatabase method
This commit also migrates from a WeakHashMap to a ConcurrentReferenceHashMap, allowing for concurrent access to existing cache entries.

Issue: SPR-15006
(cherry picked from commit b825528)
2016-12-19 01:01:41 +01:00
Juergen Hoeller 4571975414 Collection injection may refer back to factory methods on same bean again
Issue: SPR-14996
(cherry picked from commit 547b963)
2016-12-19 01:01:16 +01:00
Juergen Hoeller 5115c61b03 CommonsMultipartFile.getOriginalFilename() can be configured to preserve header-specified filename as-is
Issue: SPR-14613
(cherry picked from commit aa29495)
2016-12-19 00:59:28 +01:00
Juergen Hoeller 54c7a9ee95 Revised Jetty 9.3 vs 9.4 differentiation
Issue: SPR-14940
(cherry picked from commit 52799c0)
2016-12-19 00:58:53 +01:00
Juergen Hoeller 0296c7c5b6 Stronger explanation of default rollback rules
Issue: SPR-14994
(cherry picked from commit 953bc18)
2016-12-19 00:58:44 +01:00
Juergen Hoeller 84d8135cbb MimeType parsing properly handles quoted semicolons
Issue:  SPR-14986
(cherry picked from commit 7714eec)
2016-12-19 00:58:23 +01:00
Juergen Hoeller dd3c370bca ImportRegistry properly tracks excluded superclasses
Issue: SPR-14972
(cherry picked from commit a7ec6dc)
2016-12-19 00:57:45 +01:00
Juergen Hoeller 4e41f74925 Explicit support for retrieving enum values
Issue: SPR-14990
(cherry picked from commit 278a625)
2016-12-19 00:56:44 +01:00
Juergen Hoeller c6663f59b8 HttpInvokerClientInterceptor propagates client-side Error as-is
Issue: SPR-14985
(cherry picked from commit ee30ce9)
2016-12-19 00:56:06 +01:00
Juergen Hoeller ced7503d95 Revised forClass argument names
Issue: SPR-14976
(cherry picked from commit 8ab977e)
2016-12-19 00:55:39 +01:00
Juergen Hoeller 04af30daed JPA/Hibernate docs: transaction management, JTA setup
Issue: SPR-14957
(cherry picked from commit 2f80b84)
2016-12-19 00:55:19 +01:00
Juergen Hoeller 5ccc8e341c SpEL docs: supported literals, null comparisons
Issue: SPR-14361
Issue: SPR-14987
(cherry picked from commit 05579fd)
2016-12-19 00:55:03 +01:00
Juergen Hoeller 71977e8f9d Consistent use of "URI variables" terminology
Issue: SPR-14969
(cherry picked from commit 6517c53)
2016-12-19 00:54:49 +01:00
Rob Winch 5e774e0b44 Add Support for ForwardedHeaderFilter sendRedirect
Previously ForwrdedHeaderFilter did not ensure that
HttpServletResponse.sendRedirect worked properly based on
X-Forwarded-* headers.

This commit updates ForwardedHeaderFilter to overrided the
HttpServletResponse.sendRedirect method to ensure
X-Forwarded-* headers are honored.

Issue SPR-15020
2016-12-15 19:38:40 -05:00
Rossen Stoyanchev e16d753439 Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.

After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.

Issue: SPR-14690
2016-12-13 16:17:05 -05:00
Rossen Stoyanchev b14d189db9 MockRestRequestMatchers can match query params
Issue: SPR-14995
2016-12-13 16:07:19 -05:00
Brian Clozel 14de29c031 Improve VersionResourceResolve javadoc
The `pathPatterns` args are relative to the patterns configured for the
resource handler.

Issue: SPR-14817
Cherry-picked from: 52f664139
2016-12-13 11:01:14 +01:00
Brian Clozel b59455b63c Do not include URL hash in resource paths
When getting the lookup path of a resource, both query params and hashes
should be removed from the request path.

This commit fixes the public path resolution for paths like
`/resources/main.svg#icon-hamburgermenu`.

Issue: SPR-14928
2016-12-12 15:23:23 +01:00
Brian Clozel 1a6dc86fed 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
Cherry-picked from: 17089d6
2016-12-12 09:09:35 +01:00
Brian Clozel 35b0c8b577 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 4.3 websocket officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-09 14:58:18 +01:00
Brian Clozel 75034c3710 Revert "Update websocket support for Jetty 9.3+"
This reverts commit 305cea28c5.
2016-12-08 22:48:06 +01:00
Brian Clozel 305cea28c5 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 4.3 officially supports Jetty 9.1 to 9.3.

Issue: SPR-14940
2016-12-08 21:44:31 +01:00
Rossen Stoyanchev 69ba85b051 Backport of STOMP message header encoding improvements
Issue: SPR-14901
2016-12-08 11:33:16 -05:00
Sebastien Deleuze 5700d65a53 Append "data:" after line breaks for SSE JSON data fields
Issue: SPR-14899
2016-12-08 14:16:41 +01:00
bedrin e707c40e0b Add consumes attribute to @GetMapping
Issue: SPR-14988
2016-12-07 17:51:05 -05:00
Brian Clozel 9d37472f23 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
Cherry-picked from: ec8391a7fb
2016-12-07 09:24:13 +01:00
Juergen Hoeller eb97335c6f Polishing 2016-12-01 20:19:49 +01:00
Juergen Hoeller 0028b29760 Polishing 2016-12-01 19:09:26 +01:00
Juergen Hoeller 1ded1e38e8 Latest dependency updates (Caffeine 2.3.5, Hibernate ORM 5.2.5, Joda-Time 2.9.6, Tomcat 8.5.8, JOpt Simple 5.0.3) 2016-12-01 19:08:57 +01:00
Juergen Hoeller 149acdae7d @UsesJava8
Issue: SPR-14958
2016-12-01 14:23:59 +01:00
Juergen Hoeller 5fee5f39ea Polishing 2016-12-01 14:13:23 +01:00