Commit Graph

12233 Commits

Author SHA1 Message Date
Stephane Nicoll
037746da44 Polish
Closes gh-1097
2016-07-01 14:26:48 +02:00
Juergen Hoeller
d7184d1ad8 Latest dependency updates (HttpAsyncClient 4.1.2, HtmlUnit 2.22, Selenium 2.53.1, JOpt Simple 5.0.2) 2016-07-01 14:12:46 +02:00
Juergen Hoeller
1c73664c40 Defensively access deprecated AbstractHttpClient class from Apache HttpComponents
Issue: SPR-14422
2016-07-01 14:11:26 +02:00
Sam Brannen
8389e3fc35 Suppress warnings in Gradle build 2016-07-01 13:08:39 +02:00
Juergen Hoeller
a530a1c7f2 Upgrade to Hibernate ORM 5.2.1
Issue: SPR-14327
2016-07-01 12:57:24 +02:00
Stephane Nicoll
716273df47 Polish
Closes gh-967
2016-07-01 11:15:32 +02:00
Stephane Nicoll
49d78b4835 Merge pull request #1089 from nkjackzhang:patch-2
* pr/1089:
  Polish
  Fix typo in asciidoc
2016-07-01 11:00:08 +02:00
Stephane Nicoll
cac58738c9 Polish
Closes gh-1089
2016-07-01 10:58:15 +02:00
nkjackzhang
66fd86be33 Fix typo in asciidoc
See gh-1089
2016-07-01 10:47:06 +02:00
Stephane Nicoll
d9993243b6 Polish
Closes gh-1096
2016-07-01 10:43:54 +02:00
Stephane Nicoll
d35709dfbc Merge pull request #1095 from nkjackzhang:patch-4
* pr/1095:
  Polish contribution
  Fix typo in javadoc
2016-07-01 10:41:07 +02:00
Stephane Nicoll
2b822d5053 Polish contribution
Closes gh-1095
2016-07-01 10:40:54 +02:00
nkjackzhang
60123b6ca3 Fix typo in javadoc
See gh-1095
2016-07-01 10:40:15 +02:00
Juergen Hoeller
5c6f57ba78 Upgrade to EhCache 3.1 and Jetty 9.3.10 2016-06-30 22:25:18 +02:00
Juergen Hoeller
dda0942c78 Polishing 2016-06-30 21:39:51 +02:00
Juergen Hoeller
66ec1c1618 Add missing package-info files for common packages
Issue: SPR-14420
2016-06-30 21:39:06 +02:00
Rossen Stoyanchev
9c29ed75f8 Suppress OPTIONS handling for an ERROR dispatch
Issue: SPR-14410
2016-06-30 12:34:54 -04:00
Juergen Hoeller
16949941f8 MatchableHandlerMapping extends HandlerMapping and lives in web.servlet.handler now
Issue: SPR-14321
2016-06-30 14:38:26 +02:00
Juergen Hoeller
232cfe5e98 Polishing 2016-06-30 14:03:28 +02:00
Juergen Hoeller
c4c941c43f Convert comma-separated string into list of classes analogous to existing support for class array
Issue: SPR-14415
2016-06-30 14:02:51 +02:00
Rossen Stoyanchev
89396ff01f Refactor handleNoMatch for @RequestMapping
Originally handleNoMatch looked for partial matches based on URL
pattern, HTTP method, consumes, produces, and params in that order
but without narrowing down the set of partial matches resulting in
potentially inaccruate response status codes

Commit 473de0 added an improvement to narrow the set with partial
matches for URL pattern and HTTP method matches.

This commit overhauls handleNoMatch so that the narrowing down of
matches happens at each stage resulting in more accurate error
reporting for request mappings with fine-grained conditions.

Issue: SPR-14397
2016-06-29 15:59:00 -04:00
Stephane Nicoll
eba873067c Better hide lazy resolution of JMS payloads
This commit fixes MessagingMessageConverter to no longer expose the lazy
message resolution algorithm. This restores proper behaviour for
converters used outside of that context.

Instead, such arrangement is now private to
AbstractAdaptableMessageListener (as it should).

Issue: SPR-14389
2016-06-29 18:10:34 +02:00
Juergen Hoeller
2d5496df2b Polishing 2016-06-29 15:53:46 +02:00
Juergen Hoeller
f2328e8e3c Polishing 2016-06-29 10:57:16 +02:00
Juergen Hoeller
1d42009c0a Deprecated getPropertyAsClass and refined PropertySourcesPropertyResolver's logging
Issue: SPR-14370
2016-06-29 10:51:06 +02:00
Juergen Hoeller
37e42e68e8 Refined AspectJ caching tests
Issue: SPR-14413
2016-06-29 10:43:54 +02:00
Juergen Hoeller
772bc030ee BasicAuthorizationInterceptor belongs to http.client.support
Issue: SPR-14412
2016-06-29 10:41:18 +02:00
Stephane Nicoll
6cd85ddde7 Align caching AspectJ configuration
The `CacheResolver` and `ErrorHandler` features introduced in 4.1 were
not properly enabled in AspectJ mode. This commit adds more tests from
the regular proxy-based mode and align the AspectJ caching configuration.

Issue: SPR-14413
2016-06-29 09:21:59 +02:00
Rossen Stoyanchev
775ffbe10b Improve static resource path check 2016-06-28 16:46:51 -04:00
Sam Brannen
1a7c6d3b10 Update @since tags in HandlerMappingIntrospector & Co. 2016-06-28 19:04:03 +02:00
Stephane Nicoll
db963bc556 Add BasicAuthorizationInterceptor
This commit adds a `ClientHttpRequestInterceptor` that applies a BASIC
authorization header for each request.

It can be used as follows:

```
BasicAuthorizationInterceptor basicAuthorization =
    new BasicAuthorizationInterceptor("user", "secret");
restTemplate.getInterceptors().add(basicAuthorization);
```

Issue: SPR-14412
2016-06-28 17:29:04 +02:00
Sebastien Deleuze
64628dc8cb Add CorsFilter documentation 2016-06-28 14:51:09 +02:00
Stephane Nicoll
52387cac9a Merge pull request #1092 from nkjackzhang:patch-3
* pr/1092:
  Fix typo in asciidoc
2016-06-28 11:21:16 +02:00
nkjackzhang
5657283071 Fix typo in asciidoc
Closes gh-1092
2016-06-28 11:20:50 +02:00
Rossen Stoyanchev
ebdc770ed3 Use appropriate message id header for STOMP 1.1 vs 1.2
Issue: SPR-14391
2016-06-27 16:12:59 -04:00
Rossen Stoyanchev
2cdcf752ba MvcUriComponentsBuilder respects optional params
Issue: SPR-14405
2016-06-27 16:02:54 -04:00
Rossen Stoyanchev
e38623df87 Fix MediaType lookup for ResourceHttpRequestHandler
As of 4.3 ResourceHttpRequestHandler delegates to the configured
ContentNegotiationManager, or one created internally, to look up
the media type for are resource.

This commit ensures the internally created ContentNegotiationManager is
correctly injected with the ServletContext through which it can perform
lookups as before.

Also the ServletPathContentNegotiationStrategy now checks the
ServletContext first and then delegates to its parent the
PathContentNegotiationStrategy and not vice versa. This is
consistent with how handleNoMatch (also in the same class) works
and also matches how ResourceHttpRequestHandler worked before 4.3.

Issue: SPR-14368
2016-06-27 14:56:55 -04:00
Rossen Stoyanchev
a30ab30e4e Introduce HandlerMapping introspection API
Issue: SPR-14321
2016-06-27 14:23:02 -04:00
Brian Clozel
a25c43f695 Enforce UTF-8 response encoding in SseEmitter
This commit sets the response content type to
"text/event-stream;charset=UTF-8". Even if the SSE spec says that the
encoding should always be UTF-8 and that specifying the charset is
optional, we're setting it in all cases, since some containers might use
the default encoding "ISO-8859-1" and confuse HTTP clients.

Issue: SPR-14407
2016-06-27 17:05:31 +02:00
Juergen Hoeller
15c96b8efd ServletResponseHttpHeaders consistently overrides HttpHeaders again
Issue: SPR-14406
2016-06-27 15:33:53 +02:00
Juergen Hoeller
ea5baeb05a Upgrade to CGLIB 3.2.4
Issue: SPR-14385
2016-06-26 21:03:05 +02:00
Juergen Hoeller
e15f7efff8 InjectionPoint propagated for shortcut bean name resolution as well
Issue: SPR-14400
2016-06-26 00:18:54 +02:00
Juergen Hoeller
4102c62734 Fixed ambiguous sentence in conditional cache documentation
Issue: SPR-14399
2016-06-26 00:13:53 +02:00
Juergen Hoeller
351a729317 Explicit javadoc reference to Hibernate 5.2
Issue: SPR-14393
2016-06-24 12:55:58 +02:00
Juergen Hoeller
711eb99812 HibernateJpaVendorAdapter and LocalSessionFactoryBuilder enforce Hibernate 5.2's connection handling mode DELAYED_ACQUISITION_AND_HOLD
Issue: SPR-14393
2016-06-24 12:37:31 +02:00
Juergen Hoeller
5e08598a2a HibernateJpaDialect accepts equivalent connection for proper reset as well
Issue: SPR-14393
2016-06-23 18:24:09 +02:00
Juergen Hoeller
f5282bc1e3 PayloadArgumentResolver's MessageConversionException includes original payload type
Issue: SPR-14394
2016-06-23 17:32:30 +02:00
Brian Clozel
0345d734e6 Improve exception logging in HandlerExceptionResolvers
This commit updates AbstractHandlerExceptionResolver to only log at the
WARN level exceptions that are actually resolved by the
ExceptionResolver.

In case developers wish to log each time an ExceptionResolver is called,
a DEBUG level log is still available.

Issue: SPR-14392
2016-06-23 14:12:37 +02:00
Sam Brannen
3dbf25e018 Implement equals() & hashCode() in MockServerContainerContextCustomizer
Issue: SPR-14367
2016-06-23 13:22:10 +02:00
Sam Brannen
f7dd757593 Support WebSocket ServletServerContainerFB in the TCF
Prior to this commit, any attempt to include a bean of type
ServletServerContainerFactoryBean in the WebApplicationContext for an
integration test class annotated with @WebAppConfiguration in
conjunction the Spring TestContext Framework (TCF) would have resulted
in an IllegalStateException stating that "A ServletContext is required
to access the javax.websocket.server.ServerContainer instance."

In such scenarios, the MockServletContext was in fact present in the
WebApplicationContext; however there was no WebSocket ServerContainer
stored in the ServletContext.

This commit addresses this issue by introducing the following.

- MockServerContainer: a private mock implementation of the
  javax.websocket.server.ServerContainer interface.

- MockServerContainerContextCustomizer: a ContextCustomizer that
  instantiates a new MockServerContainer and stores it in the
  ServletContext under the attribute named
  "javax.websocket.server.ServerContainer".

- MockServerContainerContextCustomizerFactory: a
  ContextCustomizerFactory which creates a
  MockServerContainerContextCustomizer if WebSocket support is present
  in the classpath and the test class is annotated with
  @WebAppConfiguration. This factory is registered by default via the
  spring.factories mechanism.

Issue: SPR-14367
2016-06-22 22:10:16 +02:00