Commit Graph

13006 Commits

Author SHA1 Message Date
sdeleuze
e935018b0c Fix SockJs CorsConfiguration for forbidden origins
After this commit, AbstractSockJsService uses the configured allowed
origins when generating the CorsConfiguration instead of "*".

As a consequence, forbidden origin requests still result in a 403
response but now with no CORS headers in order to improve consistency
between the status code and the headers.

Issue: SPR-16304
2018-01-15 18:17:08 +01:00
Stephane Nicoll
0747cd6a70 Make sure endpoint settings override default factory settings
Issue: SPR-16338
2018-01-15 15:45:55 +01:00
Rossen Stoyanchev
0a30b71dc3 Fix failing tests caused by previous commit 2018-01-12 12:36:24 -05:00
Rossen Stoyanchev
03118542f4 MockHttpInputMessage respects getBody contract
Issue: SPR-16367
2018-01-12 11:44:42 -05:00
sdeleuze
1b3b058ebd Refine forwarded protocol support
This commit refines forwarded protocol support in order to support
proxies that only set "X-Forwarded-Proto" header and not
"X-Forwarded-Port" by performing a reset of the port in such case.

"Forwarded" header support has been updated accordingly since it
also supports similar use case, as described in SPR-15504.

Issue: SPR-16262
2018-01-09 14:56:23 +01:00
Stephane Nicoll
8aa94aee27 Fix SpEL syntax
Issue: SPR-16315
2018-01-08 08:47:57 +01:00
Rossen Stoyanchev
6dbc828aa1 MappingJackson2MessageConverter uses generic type
This is a backport of the #583201 minus use of GenericTypeResolver
which in 5.0 has been refactored to provide a getJavaType method.

Issue: SPR-16252
2018-01-04 13:17:34 -05:00
nkjackzhang
3c31e0378f Polish Javadoc
Closes gh-1627
2017-12-23 14:20:49 +01:00
sdeleuze
e6e6b8f4ad Allow interceptors to add existing header values
Additional commit to provide support of requests
that have a body.

Issue: SPR-15066
2017-12-13 09:47:55 +01:00
Rossen Stoyanchev
4fe94dffc0 Fix regression in StompHeaderAccessor
Issue: SPR-16265
2017-12-11 16:42:27 -05:00
sdeleuze
4b8a937bee Allow interceptors to add existing header values
Provide a fully mutable HttpHeaders to ClientHttpRequestInterceptors
of a RestTemplate when headers are set using HttpEntity. This avoids
UnsupportedOperationException if both HttpEntity and
ClientHttpRequestInterceptor add values for the same HTTP header.

Issue: SPR-15066
2017-12-11 17:56:48 +01:00
Spring Buildmaster
55fc731c59 Next Development Version 2017-11-27 10:39:19 +00:00
Juergen Hoeller
40a61277e1 Upgrade to Groovy 2.4.13 2017-11-26 17:57:04 +01:00
Juergen Hoeller
8c499cb10b Polishing 2017-11-26 17:56:35 +01:00
Juergen Hoeller
723b2b19a6 Consistent checks in DataAccessUtils (plus nullability hints in javadoc)
Issue: SPR-16225
2017-11-26 17:55:03 +01:00
Juergen Hoeller
f09e252417 Polishing 2017-11-21 15:25:33 +01:00
Juergen Hoeller
f3b8d7138c Consistent use of tabs for sample code in the reference documentation 2017-11-21 15:25:26 +01:00
Juergen Hoeller
47383fce97 Unit tests for configuration superclass inclusion
Issue: SPR-16217

(cherry picked from commit 08c95fb)
2017-11-21 15:25:17 +01:00
Juergen Hoeller
8206f0652b Deprecate Castor support
Issue: SPR-16219

(cherry picked from commit 08c7855)
2017-11-21 15:25:09 +01:00
jianglei
1b58fad228 Fix copy/paste in Javadoc
Closes gh-1601
2017-11-21 06:59:12 +01:00
Juergen Hoeller
a58ef88f1d SqlParameterSourceUtils.createBatch polishing (partial backport)
Issue: SPR-16215
2017-11-20 13:33:50 +01:00
Juergen Hoeller
1d060ecff0 Document common use cases for @Order vs @Priority vs @DependsOn
Issue: SPR-16213

(cherry picked from commit 84699c8)
2017-11-20 13:33:23 +01:00
Juergen Hoeller
122a3fe9fd ResourceHttpRequestHandler uses EmbeddedValueResolverAware
(cherry picked from commit 20fcefc)
2017-11-20 13:32:50 +01:00
Rossen Stoyanchev
2a309a031a Revise charset by location support for static resources 2017-11-17 12:55:11 -05:00
Juergen Hoeller
03fef655ff Restored support for placeholders in mvc namespace resource locations
With the recent charset mechanism in place, we cannot rely on implicit placeholder parsing during String-to-Resource conversion anymore.

(cherry picked from commit 7af9910)
2017-11-16 10:03:14 +01:00
Juergen Hoeller
a9e2040831 HibernateJpaVendorAdapter properly checks connectionReleaseOnClose
Issue: SPR-16162
2017-11-14 17:17:24 +01:00
Juergen Hoeller
ffbaa26b4f End of first-class JDK 6 support
Issue: SPR-16185
2017-11-14 12:32:06 +01:00
Juergen Hoeller
586912792a Upgrade to Netty 4.1.17 and Undertow 1.3.33 2017-11-14 12:31:19 +01:00
Juergen Hoeller
640c8ff693 Polishing 2017-11-14 12:31:01 +01:00
Juergen Hoeller
d52d9fd268 HibernateJpaVendorAdapter preserves connection release mode for JTA
Issue: SPR-16162
2017-11-14 12:30:49 +01:00
Juergen Hoeller
f861f182fa Reduce access on headers for STOMP messaging
Issue: SPR-16165
2017-11-14 12:30:24 +01:00
Juergen Hoeller
d5f34ed641 Correctly handle NVARCHAR, LONGNVARCHAR and NCLOBs
Issue: SPR-16154
2017-11-14 12:30:13 +01:00
Juergen Hoeller
a88c47a120 Properly handle follow-up request after failure
Issue: SPR-16132
2017-11-14 12:30:04 +01:00
Juergen Hoeller
6dc73469f9 MethodReference treats proxy-targeting expressions as non-compilable
Issue: SPR-16191

(cherry picked from commit c30145d)
2017-11-14 12:28:15 +01:00
Juergen Hoeller
59d654b0cf Unit tests for unresolvable generics with partial mismatch
Issue: SPR-16179

(cherry picked from commit e2bb06e)
2017-11-14 12:27:51 +01:00
Juergen Hoeller
9779b8b2ab SpringValidatorAdapter skips value retrieval for Set field without index
Issue: SPR-16177

(cherry picked from commit 3091fee)
2017-11-14 12:27:42 +01:00
Juergen Hoeller
2c8a6bb6f5 Explicitly document UriTemplate as thread-safe
Issue: SPR-16173

(cherry picked from commit de78202)
2017-11-14 12:27:31 +01:00
Juergen Hoeller
5800c7a18a Comprehensive documentation on injection point matching
Issue: SPR-16142

(cherry picked from commit a5da05c)
2017-11-14 12:27:21 +01:00
Juergen Hoeller
dc0a934c99 MockHttpServletResponse.getDateHeader returns -1 for non-existent header
Includes consistent getDateHeader results in both MockHttpServletResponse variants (spring-test and spring-web)

Issue: SPR-16160

(cherry picked from commit 80a0cf7)
2017-11-14 12:26:32 +01:00
Juergen Hoeller
9ca4de1ccf MockHttpServletRequest.getRequestURL aligns with getServerName/Port
Issue: SPR-16138

(cherry picked from commit 0edf4d6)
2017-11-14 12:25:55 +01:00
Juergen Hoeller
519195cf66 AbstractApplicationContext silently ignores non-initialized ApplicationEventMulticaster/LifecycleProcessor on destruction
Issue: SPR-16149

(cherry picked from commit 1611ce7)
2017-11-14 12:25:30 +01:00
Juergen Hoeller
573ff2c58d ClassPathResource uses specific constructors in createRelative
Issue: SPR-16146

(cherry picked from commit d00e4f1)
2017-11-14 12:25:18 +01:00
Rossen Stoyanchev
9470719cdb Support charset config by (static) resource location
This commit adds support for configuring static resource locations
with a charset to be applied to relative paths.
2017-11-09 14:51:49 -05:00
Rossen Stoyanchev
97bc2762e1 Handle errors via AsyncListener
This is a limited backport of commit #e0678b mainly providing the fix without
exposing the onError callbacks.

Issue: SPR-16058
2017-11-08 23:10:16 -05:00
Juergen Hoeller
5867ea0c3c Correct SpEL example (matching its comment)
Issue: SPR-16111
2017-10-27 11:31:03 +02:00
Juergen Hoeller
9cc3349e2d Introspect interface-declared methods in case of proxy (for varargs)
Issue: SPR-16122

(cherry picked from commit 419b444)
2017-10-27 11:30:52 +02:00
Juergen Hoeller
8904de2149 Drive letter case alignment in addClassPathManifestEntries
Issue: SPR-16117

(cherry picked from commit a2f5e12)
2017-10-27 11:30:43 +02:00
Juergen Hoeller
4208ec0ba8 Polishing
(cherry picked from commit 7e8c8f0)
2017-10-27 11:30:34 +02:00
Juergen Hoeller
ab19c227d3 DefaultResponseErrorHandler.hasError tolerates unknown status codes
Issue: SPR-16108
2017-10-24 15:44:37 +02:00
Juergen Hoeller
be5b9354a9 Polishing 2017-10-24 14:34:56 +02:00