Commit Graph

10644 Commits

Author SHA1 Message Date
Rossen Stoyanchev 6679120057 Improve STOMP section of documentation
Issue: SPR-12579
2015-07-07 16:17:37 -04:00
Juergen Hoeller 08fb62570e Explicit notes for load-time weaving on Tomcat 7.0.63+ and WildFly 9
Issue: SPR-13210
2015-07-07 22:01:36 +02:00
Sam Brannen 5e24ee9b55 Update RequestContextHolderTests
This commit refactors RequestContextHolderTests in preparation for the
work to be done in SPR-13211.

Issue: SPR-13211
2015-07-07 21:37:46 +02:00
Sam Brannen 50bed38a85 Polishing 2015-07-07 21:23:02 +02:00
Rossen Stoyanchev 6890e65d2c Suggest use of @Primary for JSR-303 with Spring MVC
A note is added to suggest the use of @Primary with a
LocalValidatorFactory bean next to the MVC Java config.

Issue: SPR-12194
2015-07-07 12:35:38 -04:00
Rossen Stoyanchev 726a47dd81 Refactor Spring MVC related conversion/validation docs
Conversion and validation documentation related to Spring MVC is now
consolidated in the Spring MVC chapter with references to and from
the Validation and Data Binding chapter.

Examples have been updated to include MVC Java config as well.
2015-07-07 12:35:38 -04:00
Stephane Nicoll 7cac5d60a1 Add documentation for @Primary
Issue: SPR-7301
2015-07-07 17:52:52 +02:00
Juergen Hoeller f58e1db2e6 Explicit notes for @Bean on static methods, private methods, and Java 8 default methods
Also includes an explicit note on stop vs destroy callbacks for Lifecycle beans.

Issue: SPR-13118
Issue: SPR-12882
Issue: SPR-12345
Issue: SPR-11671
2015-07-07 16:49:26 +02:00
Juergen Hoeller ca3ba7deb5 Extended/BindingAwareModelMap are not meant to be referred to in user code
Issue: SPR-12896
2015-07-07 16:44:46 +02:00
Juergen Hoeller 11ec9998ae Note on 'generateDdl' versus JPA 2.1 schema generation
Issue: SPR-13040
2015-07-07 16:44:33 +02:00
Juergen Hoeller 2a36abcaea Polishing 2015-07-07 16:44:19 +02:00
Sebastien Deleuze 97936140cc Support HandlerMethod parameter in @MessageExceptionHandler
Issue: SPR-13196
2015-07-07 15:43:39 +02:00
Juergen Hoeller f79a5c12d5 DefaultSubscriptionRegistry defensively checks for removal between keySet and get calls
Issue: SPR-13205
2015-07-07 11:11:56 +02:00
Sebastien Deleuze dd16f64998 Polish @CrossOrigin javadoc 2015-07-07 10:01:22 +02:00
Sebastien Deleuze 8ee0e78980 Add Access-Control-Request-Method check for CORS preflight requests
Issue: SPR-13193
2015-07-07 09:34:39 +02:00
Sebastien Deleuze aea23e42c7 Polish 2015-07-07 09:26:06 +02:00
Rossen Stoyanchev 0d1b7fd14f Fix RequestPartServletServerHttpRequest encoding issue
When using Appache Commons FileUpload, multi parts with binary data
(i.e. that are not actual files) are saved and then accessed as
String request parameters.

Before this change however the RequestPartServletServerHttpRequest
used a fixed encoding (UTF-8) while the parsing code in
CommonsFileUploadSupport/Resolver used the encoding from the
content-type header, or the request, or the FileUpload component.

This change does a best effort to determine the encoding of the
request parameter using a similar algorithm as the parsing side
that should work the same unless the encoding comes from the
FileUpload component which is not accessible.

Issue: SPR-13096
2015-07-07 00:47:06 -04:00
Rossen Stoyanchev dc715a0f19 Update Spring MVC Test reference
Add section on Spring MVC TEst vs full integation testing and provide
reference to Spring Boot's @WebIntegrationTest as an alternative.

Issue: SPR-13169
2015-07-06 23:06:40 -04:00
Rossen Stoyanchev 9bb29fbc34 Polish Spring MVC Test content 2015-07-06 22:27:19 -04:00
Juergen Hoeller fefc4b478f Polishing 2015-07-07 02:22:44 +02:00
Juergen Hoeller 145d88d152 Polishing 2015-07-07 00:26:31 +02:00
Juergen Hoeller f0175bc42d DefaultSubscriptionRegistry uses deep LinkedMultiValueMap copies between accessCache and updateCache
Issue: SPR-13185
2015-07-07 00:25:47 +02:00
Juergen Hoeller df8e9638ee LinkedMultiValueMap explicitly supports deep copies
Issue: SPR-13201
2015-07-07 00:24:39 +02:00
Rossen Stoyanchev 16cbfcfd2f Add test to demonstrate 4.2 not affected by SPR-13185
Issue: SPR-13185
2015-07-06 17:32:55 -04:00
Rossen Stoyanchev 0b43e4e4f2 Add concurrent test and fix potential NPE
After SPR-12884 (4.2 RC1) introduced support for a selector header
expression on SUBSCRIBE frames, messages from the destination cache
are further filtered based on the selector expression. While adding a
test to find subscriptions at the same time as unsubscribing, a
potential NPE was exposed. This commit fixes the NPE.

Issue: SPR-13204
2015-07-06 17:07:20 -04:00
Rossen Stoyanchev 5dcbc5db29 Polish DefaultSubscriptionRegistryTests 2015-07-06 17:07:20 -04:00
Sam Brannen 0f7fc12569 Clean up warnings in spring-web 2015-07-06 18:30:20 +02:00
Sam Brannen 67ac675e9a Polish AnnotationAttributes[Tests] 2015-07-06 14:41:52 +02:00
Juergen Hoeller 23124d106b CommonsMultipartResolver allows for specifying max upload size per file
Issue: SPR-13200
2015-07-06 14:01:51 +02:00
Juergen Hoeller f0c6bff82a MultipartFile interface extends InputStreamSource
Issue: SPR-11861
2015-07-06 13:53:35 +02:00
Juergen Hoeller b7acddbb19 AnnotationAttributes stores and re-throws resolution exceptions
Issue: SPR-13177
2015-07-06 13:35:16 +02:00
Sam Brannen 3f0a6e814c Suppress warnings in spring-expression tests 2015-07-04 15:46:36 +02:00
Brian Clozel 85a80e2a94 Fix error message typo in ShallowEtagHeaderFilter
Issue: SPR-13194
2015-07-03 21:40:48 +02:00
Sam Brannen ea0c37a535 Polishing 2015-07-03 18:38:20 +02:00
Sam Brannen 3c4ec9026a Introduce test for DeferredResult w/ delayed error in MVC Test
This commit introduces a test that verifies the fix introduced in
6842fd7fb9.

Issue: SPR-13079
2015-07-03 17:51:46 +02:00
Sam Brannen 0e70630ac4 Polish AsyncTests 2015-07-03 17:01:21 +02:00
Rossen Stoyanchev 05f163b37d Avoid duplicates from <websocket:decorator-factory>
Before this change <websocket:decorator-factory> decorated to
the SubProtocolWebSocketHandler RootBeanDefinition rather than
using a RuntimeBeanReference, which led to a separate instance
of SubProtocolWebSocketHandler to be created.

Issue: SPR-13190
2015-07-02 16:09:39 -04:00
Sam Brannen 688014ad9d Document MVC Test log()/print() variants in reference manual
Issue: SPR-13171
2015-07-02 21:47:14 +02:00
Sebastien Deleuze 79c7e30832 Fix SockJsServiceTests
Issue: SPR-12422
2015-07-02 16:35:32 +02:00
Sebastien Deleuze 6c58258d11 Update AbstractSockJsService and ref doc to SockJS client 1.0.0
Issue: SPR-12422
2015-07-02 15:38:36 +02:00
Sam Brannen 0aac02d649 Introduce DirtiesContextBeforeModesTestExecutionListener
SPR-12429 introduced various `BEFORE_*` modes in `@DirtiesContext`. To
support these new modes, `DirtiesContextTestExecutionListener` (DCTEL)
was updated to support both `BEFORE_*` and `AFTER_*` modes. However,
there is a problem with having DCTEL support `BEFORE_*` modes since it
is typically configured to execute after the
`DependencyInjectionTestExecutionListener` (DITEL), and this leads to
several undesired side effects:

 - The test's `ApplicationContext` is closed by DCTEL *after*
   dependencies have been injected into the test instance.

 - Injected dependencies may therefore attempt to interact with an
   `ApplicationContext` that is no longer _active_.

 - If a test has its `ApplicationContext` injected as a dependency,
   interaction with the context will likely fail since the context has
   been closed.

 - Any `TestExecutionListeners` registered after DCTEL will get a _new_
   `ApplicationContext` if they invoke `getApplicationContext()` on the
   `TestContext`.

This commit fixes these issues by introducing a new
`DirtiesContextBeforeModesTestExecutionListener` (DCBMTEL) that is
registered by default before DITEL. The previous support for `BEFORE_*`
modes has been moved from DCTEL to DCBMTEL. In addition, an
`AbstractDirtiesContextTestExecutionListener` has been extracted from
DCTEL in order to avoid code duplication.

Issue: SPR-13180
2015-07-01 20:55:12 +02:00
Rossen Stoyanchev 3272a3b8ba Check HTTP method before raising 415
This commit moves the check whether an HTTP method supports request
body up to the base class so that all sub-classes can benefit (not just
@RequestBody).

Issue: SPR-13176
2015-06-30 15:24:01 -04:00
Brian Clozel 244c95b076 Fix @RequestBody argument processing for null Content-Type
Since the changes introduced in SPR-12778, some `@RequestBody` args
would not be properly processed in some cases:

* requests with an empty body
* no Content-Type header defined

This typically happens when GET requests are mapped on a handler dealing
with POST requests and HTTP bodies.

This change makes sure that the `RequestResponseBodyMethodProcessor` is
only involved for requests that:

* have a Content-Type defined
* OR are HTTP requests eligible for an HTTP body (PUT, POST, PATCH)

Issue: SPR-13176
Fixes spring-projects/spring-boot#3313
2015-06-30 19:13:34 +02:00
Rossen Stoyanchev 749bee4d58 Polish tests 2015-06-30 12:16:22 -04:00
Sam Brannen df83196ad7 Update required email dependencies in reference manual
Beginning with Java 6, the JavaBeans Activation Framework (JAF) is part
of the JDK. Thus, there is no longer a need to explicitly include a
dependency on `activation.jar` when using Spring's email support in
Spring Framework 4.0 and higher which anyway requires Java 6 or higher.

This commit therefore removes the JAF requirement from the reference
manual.
2015-06-30 18:12:08 +02:00
Juergen Hoeller 265cd2ad1e Javadoc fine-tuning for 4.2 2015-06-30 18:02:42 +02:00
Juergen Hoeller 0411435bac XML parsing tests pass on non-English locales now, plus a revised exception message and some minor polishing
Issue: SPR-13136
(cherry picked from commit 38b8262e1e)
2015-06-30 17:16:45 +02:00
Rossen Stoyanchev d79ec68db4 Disable DTD when parsing untrusted XML input
Issue: SPR-13136
2015-06-30 07:50:21 -04:00
Juergen Hoeller 2d6ec953e4 Latest dependency updates (Jackson 2.6 RC3, JavaMail 1.5.4, JRuby 1.7.20.1) 2015-06-30 12:46:04 +02:00
Juergen Hoeller 4facb2fc22 ContentCachingResponseWrapper defensively applies content length in case of sendError/sendRedirect
Issue: SPR-13004
2015-06-30 12:45:43 +02:00