Commit Graph

1127 Commits

Author SHA1 Message Date
Juergen Hoeller
cc70fdcbeb Backport further refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 15:20:17 +02:00
Juergen Hoeller
5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
dedecb9daa HttpEntityMethodProcessor lets entity headers override existing headers (again)
Issue: SPR-15952

(cherry picked from commit 5bdcb89)
2017-09-26 23:58:49 +02:00
Juergen Hoeller
9dcdfec2e2 Properly retrieve and expose HttpServletResponse for async requests
Issue: SPR-15867
2017-09-08 19:40:46 +02:00
Juergen Hoeller
c752ba5b38 Polishing 2017-07-19 23:55:47 +02:00
Juergen Hoeller
e138d7d29f Page-level JSTL time zone support for JSP tags
Issue: SPR-15746
2017-07-12 22:59:42 +02:00
Juergen Hoeller
b35c238d27 Cleanup of duplicate semicolons
Issue: SPR-15654
(cherry picked from commit 779deb0)
2017-06-30 16:06:05 +02:00
Rossen Stoyanchev
8c206bf477 Improve docs on forwarded headers
Issue: SPR-15612
2017-06-01 22:37:34 -04:00
skarafaz
e2aa117ff9 Find exact matches in WebJarsResourceResolver
Prior to this commit, resolving resources from webjars using the
`WebJarAssetLocator.getFullPath` could lead to multiple candidates,
since this method is trying to find *any* resource matching that path
under the given webjar location.

This commit replaces that call with
`WebJarAssetLocator.getFullPathExact`, which avoids those multiple
matches and only resolves resources if the given path is exact.

Issue: SPR-15526
2017-05-24 10:45:38 +02:00
Martin Švorc
e0a7b074ed Use original query string of forwarded request
Prior to this commit, the AbstractFlashMapManager has used the
originating URI but the query string of the forwarded request. That
resulted to FlashMap not being matched even when both originating
URI and query string matched the FlashMap attributes. The originating
query string is now used to match the forwarded request.

Issue: SPR-15505
2017-05-19 17:07:17 -04:00
Juergen Hoeller
78931ee3ea Polishing 2017-05-07 21:41:26 +02:00
Juergen Hoeller
e522fec611 HandlerExecutionChain.toString() includes reliable interceptor number
Issue: SPR-15525
(cherry picked from commit 92f18a4)
2017-05-07 21:26:01 +02:00
Juergen Hoeller
1332482c40 Polishing 2017-05-04 14:09:15 +02:00
Juergen Hoeller
799589ec1c Revised javadoc
Issue: SPR-15466
2017-05-04 14:08:14 +02:00
Juergen Hoeller
dab56dbb05 GenericFilterBean lazily initializes its default environment
Alignment with HttpServletBean; consistent use of EnvironmentCapable.

Issue: SPR-15469
(cherry picked from commit 1ea54eb)
2017-05-04 14:01:09 +02:00
Juergen Hoeller
a9a1f783c5 Polishing 2017-04-13 15:59:15 +02:00
Juergen Hoeller
421fabb2c4 Configurable locale/timezone attribute name for SessionLocaleResolver
Issue: SPR-15450
(cherry picked from commit cec36fe)
2017-04-13 15:56:07 +02:00
Juergen Hoeller
a3d199f4dd AcceptHeaderLocaleResolver returns default locale in case of no supported locale found
Issue: SPR-15426
(cherry picked from commit ea98ee8)
2017-04-13 15:54:46 +02:00
Juergen Hoeller
597fe0720f HandlerMethod evaluates ResponseStatus annotation for early caching
Issue: SPR-15227
(cherry picked from commit 5986f88)
2017-04-13 15:54:35 +02:00
Rossen Stoyanchev
f7548a87ed Deprecations related to reactive type support in 5.0
Issue: SPR-15365
2017-04-03 09:26:46 -04:00
Brian Clozel
70bca99da8 VersionResourceResolver should delegate to the chain
Prior to this commit, the `VersionResourceResolver` implementation of
`resolveUrlPathInternal` would delegate to the resolver chain but would
never use the give result if the current request didn't match a
configured version strategy pattern.

This is a problem if the resolver supposed to resolve the resource path
is configured after a `VersionResourceResolver` in the resolver chain;
this means that other resolver never gets to participate in the result
of the chain.

Issue: SPR-15372
(cherry picked from commit fdd5031)
2017-03-24 14:27:29 +01:00
Juergen Hoeller
21ac764e5c Polishing 2017-03-24 13:41:34 +01:00
Juergen Hoeller
d0177b0f55 Revised supportedMethods null handling in HttpRequestMethodNotSupportedException
Issue: SPR-15377
(cherry picked from commit 5ea4abd)
2017-03-24 13:40:35 +01:00
Rossen Stoyanchev
ffe9bae138 Update Javadoc on exception resolvers in MVC config
Issue: SPR-15324
2017-03-07 20:51:22 -05:00
stonio
1db42081e5 Use String#isEmpty()
Closes gh-1335
(cherry picked from commit 7d062df)
2017-02-22 16:31:35 +01:00
Juergen Hoeller
34a0857628 Polishing
(cherry picked from commit d2cc97a)
2017-02-21 23:03:16 +01:00
Juergen Hoeller
35e37f6b60 Polishing 2017-02-20 23:15:05 +01:00
Juergen Hoeller
f117b804a8 ServletRequestMethodArgumentResolver passes null references through (again)
Issue: SPR-15214
(cherry picked from commit fc11321)
2017-02-20 23:14:54 +01:00
Juergen Hoeller
0f71f58616 Polishing 2017-02-18 00:52:12 +01:00
Juergen Hoeller
b0ef80c3ff Polishing 2017-02-16 14:20:40 +01:00
Juergen Hoeller
4d2360e5b5 Defensively ignore multipart parsing failure in case of error dispatch
Issue: SPR-15231
(cherry picked from commit d44325e)
2017-02-16 14:19:57 +01:00
Juergen Hoeller
c15d687bf0 Polishing
(cherry picked from commit acf511a)
2017-02-02 21:20:27 +01:00
Juergen Hoeller
6014ca9140 ServletRequestMethodArgumentResolver validates argument type match
Issue: SPR-15214
(cherry picked from commit e44533f)
2017-02-02 21:19:45 +01:00
Juergen Hoeller
28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Juergen Hoeller
b97e7d53bc Revised CookieLocaleResolver parse exception handling
Issue: SPR-15182
(cherry picked from commit e8776f8)
2017-01-24 19:28:47 +01:00
Juergen Hoeller
fb3191904a DispatcherServet.checkMultipart considers MultipartException cause as well
Issue: SPR-15178
(cherry picked from commit ecc22f7)
2017-01-23 23:31:55 +01:00
Juergen Hoeller
801b93a078 Clarify WebContentInterceptor path mappings and efficiently match them
Issue: SPR-15096
2017-01-17 21:12:54 +01:00
Juergen Hoeller
8b960099f1 Introduce media types for application/rss+xml
Issue: SPR-15109
2017-01-12 22:53:38 +01:00
Philippe Marschall
f7d126043b Remove use of Boolean constructors
Codacy warns us that there are several references to Boolean
constructors in the tests. Direct usage of the Boolean constructor is
discouraged and even deprecated in Java 9 [1]. Boolean constructor use
can easily be replaced with the constant instances.

This commit contains the following changes:

 - replace references to Boolean constructors with boolean constants in
   JSP tag tests
 - update the copyright year where necessary
 - BooleanComparatorTests is intentionally left unchanged as it should
   also work with the non-constant instances correctly

 [1] http://download.java.net/java/jdk9/docs/api/java/lang/Boolean.html#Boolean-boolean-

Issue: SPR-15076
2017-01-04 09:32:32 +01:00
Brian Clozel
e2d6e709c3 Normalize resource URL in ResourceServlet
Issue: SPR-14946
2016-12-21 10:21:28 +01:00
Juergen Hoeller
b5f2e56e38 Polishing 2016-12-19 01:51:57 +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
f3cc4ab09d @RequestBody supports java.util.Optional
Issue: SPR-15007
(cherry picked from commit eeb7ae5)
2016-12-19 01:03:18 +01: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
bedrin
e707c40e0b Add consumes attribute to @GetMapping
Issue: SPR-14988
2016-12-07 17:51:05 -05:00
Juergen Hoeller
5fee5f39ea Polishing 2016-12-01 14:13:23 +01:00
Juergen Hoeller
f22a4a4e80 No warn logging for propagated original exception
Issue: SPR-14907
(cherry picked from commit 96bfc14)
2016-12-01 14:10:01 +01:00