- 14 6月, 2012 1 次提交
-
-
由 Maxim Valyanskiy 提交于
Previously MediaType could only parse double-quoted parameters without raising an IllegalArgumentException. Now parameters can also be single-quoted. Issue: SPR-8917
-
- 13 6月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
HttpStatus cannot be created with an unknown status code. If a server returns a status code that's not in the HttpStatus enum values, an IllegalArgumentException is raised. Rather than allowing it to propagate as such, this change ensures the actual exception raised is a RestClientException. Issue: SPR-9406
-
- 01 6月, 2012 2 次提交
-
-
由 Scott Andrews 提交于
Default HTTP error exceptions thrown from RestTemplate now include response headers in addition to the response body. In particular, this enables inspection of the Content-Type header allowing manual deserialization of the response body without guessing as to the content type. - introduce HttpStatusCodeException#getResponseHeaders - add constructor with headers param for HttpStatusCodeException, HttpClientErrorException and HttpServerErrorException - preserve exsisting constructor signatures - mark HttpHeaders as Serializable - generate new serialVersionUID where needed Issue: SPR-7938
-
由 Chris Beams 提交于
The following style updates have been made in anticipation of substantive changes in subsequent commits: - organize imports - correct whitespace errors (leading spaces in code, tabs in Javadoc) - wrap Javadoc at 90 chars; make imperative ("Return" vs. "Returns") - use conventional constructor argument wrapping A serialVersionUID has also been added to RestClientException and its ResourceAccessException subclass for consistency with the rest of that same exception hierarchy. Issue: SPR-7938
-
- 22 5月, 2012 1 次提交
-
-
由 Arjen Poutsma 提交于
This commit introduces three abstract WebApplicationInitializers, to be used in the typical setup of a Spring-based web application. - AbstractContextLoaderInitializer provides an abstract base class for registering a ContextLoaderListener. - AbstractDispatcherServletInitializer provides an abstract base class for registering a DispatcherServlet, with an optional root context. - AbstractAnnotationConfigDispatcherServletInitializer provides an abstract base class for registering a DispatcherServlet and optional ContextLoaderListener based on annotated (e.g. @Configuration) classes. Issue: SPR-9300
-
- 18 5月, 2012 1 次提交
-
-
由 Sam Brannen 提交于
Reordered inline comments so that they now apply to current state of the code. Added logger entry in testlog4j.properties to avoid console warning. Issue: SPR-9417
-
- 17 5月, 2012 1 次提交
-
-
由 Chris Beams 提交于
Previously, if the resolution of a ${...} placeholder resulted in a valid URL for the location of a log4j properties/XML file, the URL would ultimately be malformed by an unnecessary call to to WebUtils#getRealPath. The implementation of Log4jWebConfigurer#initLogging now eagerly attempts SystemPropertyUtils#resolvePlaceholders before checking to see if the location is a valid URL, and bypassing the call to WebUtils#getRealPath if so. Issue: SPR-9417
-
- 16 5月, 2012 1 次提交
-
-
由 Chris Beams 提交于
SPR-7591 introduced a java.nio.charset.Charset field within HttpStatusCodeException. The former is non-serializable, thus by extension the latter also became non-serializable. Because the Charset field is only used for outputting the charset name in HttpStatusCodeException#getResponseBodyAsString, it is reasonable to store the value returned by Charset#name() instead of the actual Charset object itself. This commit refactors HttpStatusCodeException's responseCharset field to be of type String instead of Charset and adds tests to prove that HttpStatusCodeException objects are once again serializable as expected. Issue: SPR-9273, SPR-7591
-
- 12 5月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
Before this fix the q-value of media types in the Accept header were ignored when using the new RequestMappingHandlerAdapter in combination with @ResponseBody and HttpMessageConverters. Issue: SPR-9160
-
- 11 5月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
The ErrorsMethodArgumentResolver expects the preceding @ModelAttribute in the controller method signature to be the last one added in the model -- an assumption that can break if a model attribute is added earlier (e.g. through a @ModelAttribute method) and more attributes are added as well. This fix ensures when an @ModelAttribute is resolved as a controller method argument it has the highest index in the model. Issue: SPR-9378
-
- 10 5月, 2012 2 次提交
-
-
由 Rossen Stoyanchev 提交于
Jackson serialization supports pretty printing. Usually it's enabled by invoking ObjectMapper.configure(..), which is not convenient for apps with XML configuration. The Jackson HttpMessageConverter and View now both have a prettyPrint property. A second more serious issue is documented here: https://github.com/FasterXML/jackson-databind/issues/12 The workaround discussed at the above link has been implemented. Issue: SPR-7201
-
由 Rossen Stoyanchev 提交于
Jackson 2 uses completely new package names and new maven artifact ids. This change adds Jackson 2 as an optional dependency and also provides MappingJackson2HttpMessageConverter and MappingJackson2JsonView for use with the new version. The MVC namespace and the MVC Java config detect and use MappingJackson2HttpMessageConverter if Jackson 2 is present. Otherwise if Jackson 1.x is present, then MappingJacksonHttpMessageConverter is used. Issue: SPR-9302
-
- 02 5月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
The fromUri method of UriComponentsBuilder used uri.getXxx() methods, which decode the URI parts causing URI parsing issues. The same method now uses uri.getRawXxx(). Issue: SPR-9317
-
- 27 4月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
When a controller returns a DeferredResult, the underlying async request will eventually time out. Until now the default behavior was to send a 503 (SERVICE_UNAVAILABLE). However, this is not desirable in all cases. For example if waiting on an event, a timeout simply means there is no new information to send. To handle those cases a DeferredResult now accespts a timeout result Object in its constructor. If the timeout occurs before the DeferredResult is set, the timeout result provided to the constructor is used instead. Issue: SPR-8617
-
- 24 4月, 2012 1 次提交
-
-
由 Rossen Stoyanchev 提交于
* Clarify semantics and behavior of AsyncWebRequest methods in most cases making a best effort and not raising an exception if async processing has completed for example due to a timeout. The startAsync() method is still protected with various checks and will raise ISE under a number of conditions. * Return 503 (service unavailable) when requests time out. * Logging improvements. Issue: SPR-8517
-
- 19 4月, 2012 2 次提交
-
-
由 Rossen Stoyanchev 提交于
Issue: SPR-8517
-
由 Rossen Stoyanchev 提交于
From a programming model perspective, @RequestMapping methods now support two new return value types: * java.util.concurrent.Callable - used by Spring MVC to obtain the return value asynchronously in a separate thread managed transparently by Spring MVC on behalf of the application. * org.springframework.web.context.request.async.DeferredResult - used by the application to produce the return value asynchronously in a separate thread of its own choosing. The high-level idea is that whatever value a controller normally returns, it can now provide it asynchronously, through a Callable or through a DeferredResult, with all remaining processing -- @ResponseBody, view resolution, etc, working just the same but completed outside the main request thread. From an SPI perspective, there are several new types: * AsyncExecutionChain - the central class for managing async request processing through a sequence of Callable instances each representing work required to complete request processing asynchronously. * AsyncWebRequest - provides methods for starting, completing, and configuring async request processing. * StandardServletAsyncWebRequest - Servlet 3 based implementation. * AsyncExecutionChainRunnable - the Runnable used for async request execution. All spring-web and spring-webmvc Filter implementations have been updated to participate in async request execution. The open-session-in-view Filter and interceptors implementations in spring-orm will be updated in a separate pull request. Issue: SPR-8517
-
- 31 1月, 2012 2 次提交
-
-
由 Chris Beams 提交于
Each of these tests began failing during the Gradle build porting process. None seem severe, many are likely due to classpath issues. In the case of TestNG support, this needs to be added to the Gradle build in order to execute these tests. See SPR-8116.txt
-
由 Chris Beams 提交于
This renaming more intuitively expresses the relationship between subprojects and the JAR artifacts they produce. Tracking history across these renames is possible, but it requires use of the --follow flag to `git log`, for example $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java will show history up until the renaming event, where $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java will show history for all changes to the file, before and after the renaming. See http://chrisbeams.com/git-diff-across-renamed-directories
-