Commit Graph

1442 Commits

Author SHA1 Message Date
Juergen Hoeller
9c36b53833 Upgrade to JAXB 2.3.0.1, Aalto XML 1.1, Rome 1.10 2018-06-11 22:01:51 +02:00
Brian Clozel
417354da8a Remove dependency management noise from POMs
Prior to this commit, the generated POMs for Spring Framework modules
would contain unneeded/harmful information from the Spring Framework
build:

1. The BOM imports applied to each module by the dependency
management plugin, for example for Netty or Reactor Netty.
Spring should not export that opinion to its POMs.

2. The exclusion of "org.slf4:jcl-over-slf4j" from *all* dependencies,
which made the POMs much larger than necessary and suggested to
developers that they should exclude it as well when using all those
listed dependencies. In fact, only Apache Tiles currently brings that
transitively.

This commit removes that information from the POMs.
The dependencyManagement Gradle plugin is disabled for POM generation
and we manually resolve the dependency versions during the generation
phase.
The Gradle build is streamlined to exclude "org.slf4:jcl-over-slf4j"
only when necessary.

Issue: SPR-16893
2018-06-11 15:57:54 +02:00
Rossen Stoyanchev
86c861516d Accept Predicate instead of HandlerTypePredicate
Issue: SPR-16336
2018-06-08 15:32:07 -04:00
Sebastien Deleuze
ac37b678a3 Remove JSONP support
CORS is now widely supported and should be used instead for cross-domain
requests.

Issue: SPR-16914
2018-06-08 12:15:48 +02:00
Rossen Stoyanchev
19dc981685 Path prefixes for groups of controllers
Issue: SPR-16336
2018-06-07 18:18:42 -04:00
Rossen Stoyanchev
3acb96efd0 CachingResourceResolver varies by known codings only
Issue: SPR-16381
2018-06-04 23:30:35 -04:00
Juergen Hoeller
356bfe6e2e Upgrade to Joda-Time 2.10 2018-05-31 23:35:15 +02:00
Juergen Hoeller
f3e860e8f1 Resource handler tests expect status 404 for directory in jar file
Issue: SPR-16832
2018-05-30 00:31:35 +02:00
Juergen Hoeller
69f14a2038 ClassPathResource.isReadable() checks InputStream (for jar directories)
Resource.isReadable() is defined to semantically imply exists() now.

Issue: SPR-16832
2018-05-29 21:47:33 +02:00
Juergen Hoeller
8593fec22c Avoid ConstantConditions warnings suppression (plus related polishing)
Issue: SPR-15756
2018-05-29 21:47:10 +02:00
Juergen Hoeller
836a09d5c0 Upgrade to Woodstox 5.1, XMLUnit 2.6, Gson 2.8.5 2018-05-25 00:18:06 +02:00
Rossen Stoyanchev
85e8634810 Properly initialize URI/Matrix vars w/ urlDecode=false
Issue: SPR-16867
2018-05-24 15:08:39 -04:00
Rossen Stoyanchev
b472d192f4 Improve support for caching encoded resources
The key in CachingResourceResolver now includes the "Accept-Encoding"
request header cleaned to exclude "*", "identity", and parameters, and
also sorted alphabetically.

For encoded resources the response now includes a response header with
"Vary: Accept-Encoding".

Issue: SPR-16381
2018-05-23 09:17:21 -04:00
Rossen Stoyanchev
9274de390a Polish resource handling tests 2018-05-23 09:17:21 -04:00
Rossen Stoyanchev
f121aa5e31 Immutable Resource[Resolver|Transformer]Chains
Issue: SPR-16862
2018-05-23 09:17:21 -04:00
Rossen Stoyanchev
5207672b3f Configurable support for static resource encodings
The new EncodedResourceResolver is a generalized version of
GzipResourceResolver that can be configured to support different
content codings, by "br" and "gzip".

GzipResourceResolver is now deprecated.

Issue: SPR-16381
2018-05-23 09:17:21 -04:00
Juergen Hoeller
285eb94a03 Upgrade to Hibernate Validator 6.0.10 2018-05-18 22:22:12 +02:00
Rossen Stoyanchev
395792b302 Produces media types cleared prior to error handling
Issue: SPR-16318
2018-05-14 23:16:36 -04:00
Rossen Stoyanchev
6cf6d8834c List OPTIONS in OPTIONS responses for @RequestMapping
Issue: SPR-16513
2018-05-14 09:05:03 -04:00
Rossen Stoyanchev
4da43de7e1 Remove individual detection of forwarded headers
This commit removes all places where forwarded headers are checked
implicitly, on an ad-hoc basis.

ForwardedHeaderFilter is expected to be used instead providing
centralized control over using or discarding such headers.

Issue: SPR-16668
2018-05-11 09:31:39 -04:00
Rossen Stoyanchev
1aadf2c3a6 Refine compareTo for param and header conditions
Issue: SPR-16674
2018-05-08 18:12:51 -04:00
Juergen Hoeller
c238fb441b Polishing
(cherry picked from commit 2da02cc)
2018-05-08 00:58:58 +02:00
Juergen Hoeller
a200df6c8d Explicit coverage of root vs cause exception matching in MVC ref docs
Issue: SPR-16743
2018-05-07 22:30:26 +02:00
Juergen Hoeller
53aa9cc4cd Upgrade to Servlet API 4.0.1 (aligned with Tomcat 9 and Undertow 2)
Issue: SPR-16470
2018-05-07 14:17:28 +02:00
nkjackzhang
321d7b0b06 Put CacheControl.empty() in else part.
Make sure the constructor of `CacheControl` being invoked only once.
2018-05-07 13:13:44 +02:00
Juergen Hoeller
d0bd57b100 Polishing
(cherry picked from commit 0795ae5)
2018-05-05 17:04:24 +02:00
Juergen Hoeller
c9f488363d Fine-tuned assertions and related polishing 2018-05-05 14:39:43 +02:00
Juergen Hoeller
7b894fe73b ResponseEntityExceptionHandler rethrows unknown exception (for further processing in DispatcherServlet's HandlerExceptionResolver chain)
Issue: SPR-16743
2018-05-05 12:46:58 +02:00
Johnny Lim
fb898e1727 Remove inconsistent spaces 2018-05-05 11:07:35 +02:00
Johnny Lim
6519e7b22a Polish 2018-04-27 14:06:48 -04:00
Rossen Stoyanchev
de18d96413 Validate contextPath in RedirectView
Issue: SPR-16752
2018-04-23 15:26:18 -04:00
Brian Clozel
e9a8a5065b Disable HTTP Range support for InputStreamResource
Prior to this commit, the `AbstractMessageConverterMethodProcessor`
would fail to convert `InputStreamResource` to `ResourceRegion` as
expected, since the content length cannot be read without consuming the
stream. This is enforced by the `HttpRange` class.

Now the method processor would still try to output HTTP range response
headers to provide range support information. This step is using the
resource content length and reads the input stream, leading to
exceptions such as "IllegalStateException: InputStream has already been
read".

This commit improves the return type detection and excludes early
`InputStreamResource` return types. With those types, HTTP range support
is now completely disabled.

Issue: SPR-16754
2018-04-23 18:39:05 +02:00
sdeleuze
1d6540b1c2 Enable KotlinScriptTemplateTests after KT-18833 fix 2018-04-23 14:49:22 +02:00
Juergen Hoeller
0754833b37 Local XMLUnit dependency declarations with consistent version 2.5.1 2018-04-14 21:03:20 +02:00
Juergen Hoeller
7ee6130680 Revised reference example for linkable controller method signature
Issue: SPR-16710
2018-04-12 14:45:11 +02:00
Juergen Hoeller
f28a5d0cf7 Proper exception for controller method return types that do not work with MvcUriComponentsBuilder (e.g. final classes)
Includes direct use of ControllerMethodInvocationInterceptor for return type Object, avoiding the attempt to generate an Object subclass.

Issue: SPR-16710
2018-04-11 16:05:54 +02:00
Sam Brannen
aba882af4c Clean up warnings in spring-webmvc 2018-04-04 14:04:54 +02:00
Sam Brannen
2c648379ab Delete dead code in spring-webmvc 2018-04-04 14:01:24 +02:00
Juergen Hoeller
aa0face9a1 Upgrade to RxJava 1.3.8 and Rhino 1.7.9 2018-04-03 15:18:25 +02:00
Juergen Hoeller
8a9321652d Refined javadoc 2018-03-31 23:07:08 +02:00
Juergen Hoeller
912c270f2b Polishing 2018-03-31 17:49:21 +02:00
Juergen Hoeller
6393e5ce0c Consistent Ordered.LOWEST_PRECEDENCE declarations for default order 2018-03-31 00:20:44 +02:00
Rossen Stoyanchev
b1048975d2 Minor updates based on PR#1058
The original repo no longer exists:
https://github.com/spring-projects/spring-framework/pull/1058
2018-03-30 13:36:20 -04:00
Rossen Stoyanchev
240d6f52c9 Replaces rather than prepend contextPath
Issue: SPR-16650
2018-03-29 18:17:29 -04:00
Rossen Stoyanchev
dd96c873e3 Improve docs on forwarded headers
Issue: SPR-16660
2018-03-29 16:11:01 -04:00
Juergen Hoeller
b165475eb6 Polishing 2018-03-29 16:05:52 +02:00
Juergen Hoeller
695bf2961f Consistent trace logging in PathResourceResolver
Issue: SPR-16616
2018-03-29 16:04:33 +02:00
igor-suhorukov
e6020ed377 avoid unnecessary autoboxing 2018-03-28 23:48:12 +02:00
igor-suhorukov
4aae6a6dda Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646 2018-03-28 01:09:03 +02:00
Rossen Stoyanchev
f3994467c4 Refine ContentNegotiationStrategy contract
Consistently return "*/*" if no media types were requested rather than
an empty list. Existing code has to check for both in any case to see
if nothing was requested.

Issue: SPR-16624
2018-03-27 16:54:19 -04:00