- 26 7月, 2015 1 次提交
-
-
由 Sam Brannen 提交于
Since Spring Framework 2.5, @Rollback has been supported on test methods, with class-level rollback settings configured via @TransactionConfiguration; however, allowing @Rollback to be declared on test classes with method-level declarations overriding class-level declarations would prove more intuitive than having to declare both @TransactionConfiguration and @Rollback. Furthermore, the transactionManager flag in @TransactionConfiguration was made superfluous many years ago with the introduction of support for a qualifier in @Transactional. This commit enables @Rollback to be declared at the class level for default rollback semantics within test class hierarchies and deprecates @TransactionConfiguration in favor of @Rollback and @Transactional qualifiers. Issue: SPR-13276, SPR-13277
-
- 25 7月, 2015 2 次提交
-
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
Issue: SPR-13272
-
- 24 7月, 2015 6 次提交
-
-
由 Juergen Hoeller 提交于
AbstractMessageConverter provides overloaded methods with a conversion hint, MappingJackson2MessageConverter takes that hint into account, and SimpMessagingTemplate transformes such a hint in the given headers map into an explicit argument invocation argument. Issue: SPR-13265
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
由 Sebastien Deleuze 提交于
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
- 23 7月, 2015 2 次提交
-
-
由 Sam Brannen 提交于
-
由 Brian Clozel 提交于
Prior to this change, calling the `setDateHeader` method on a Spring Test MockHttpServletResponse instance would just store the given long value in a Map, not writing it as a formatted date String. Also, calling `getDateHeader` on a MockHttpServletRequest would not support date strings and could not parse those values. This can be problematic when testing features related to date headers such as "Expires", "If-Modified-Since", "Last-Modified", etc. This commit adds formatting and parsing capabilities to Servlet Mocks for date strings in HTTP headers. When formatting dates to Strings, the date format used is the one preferred by the HTTP RFC. When parsing date Strings, multiple date formats are supported for better compatibility. Issue: SPR-11912
-
- 22 7月, 2015 14 次提交
-
-
由 Sam Brannen 提交于
SPR-13211 introduced support for reusing mock requests in Spring MVC Test if the request was created by the the Spring TestContext Framework. Unfortunately, that change makes it impossible for MockMvc.perform() to be invoked multiple times within the same test method without side effects. For example, session attributes and request parameters are transparently and unexpectedly retained for subsequent invocations of perform(), causing certain categories of tests to fail. This commit reverts the changes introduced in SPR-13211 and introduces a new MockMvcReuseTests class to serve as regression tests within Spring's test suite. Issue: SPR-13260, SPR-13211
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
Issue: SPR-13257
-
由 Brian Clozel 提交于
-
由 Brian Clozel 提交于
HTTP headers such as "Expires", "Last-Modified" all use date strings like "Tue, 21 Jul 2015 10:00:00 GMT". Prior to this commit, there was no way to match those header values, besides formatting dates manually. This commit introduces a new HeaderResultMatcher to test those date headers using a long timestamp: ``` this.mockMvc.perform(get("/persons/1").header("If-Modified-Since", now)) .andExpect(status().isNotModified()) .andExpect(header().dateValue("Last-Modified", timestamp)); ``` Issue: SPR-13263
-
由 Sam Brannen 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
-
由 Juergen Hoeller 提交于
Streamlined WebContentGenerator API variants: checkRequest, prepareResponse, applyCacheControl, applyCacheSeconds Issue: SPR-11792
-
由 Juergen Hoeller 提交于
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
- 21 7月, 2015 12 次提交
-
-
由 Sam Brannen 提交于
Issue: SPR-13006
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
由 Brian Clozel 提交于
Prior to this change, calling the `setDateHeader` method on a MockHttpServletResponse instance (internal implementation for testing the spring-web module) would just store the given long value in a Map, not writing it as a formatted date String. This can be problematic when testing features related to date headers such as "Expires", "If-Modified-Since", "Last-Modified", etc. This commit formats long dates into date Strings using the date format recommended by the RFC and the GMT time zone.
-
由 Brian Clozel 提交于
-
由 Brian Clozel 提交于
-
由 Brian Clozel 提交于
-
由 Felix 提交于
As filter-based libraries and projects (such as Spring Security) may use the "Pragma" header in HTTP responses, WebContentGenerator should make sure that such headers are overwritten to avoid clashes with the HTTP caching headers set by the HTTP caching configuration. Issue: SPR-13252
-
由 Sam Brannen 提交于
-
由 Brian Clozel 提交于
Use ServletHttpResponse.setDateHeader whenever possible and avoid using SimpleDateFormat.
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
Prior to this commit, the Spring MVC Test Framework always created a new MockHttpServletRequest, disregarding any mock request already present in Spring Web's RequestContextHolder -- for example, one created by the ServletTestExecutionListener in the Spring TestContext Framework (TCF). This commit modifies MockHttpServletRequestBuilder so that it reuses a mock request created by the TCF. However, MockMultipartHttpServletRequestBuilder continues to always create a new MockMultipartHttpServletRequest since a MockHttpServletRequest created by the TCF is not directly compatible with a MockMultipartHttpServletRequest. Furthermore, in order to avoid unforeseen side effects, MockHttpServletRequestBuilder will always create a new MockHttpServletRequest if a mock request is present in the RequestContextHolder but not created by the TCF. Issue: SPR-13211
-
- 20 7月, 2015 3 次提交
-
-
由 Sam Brannen 提交于
This commit replaces calls to System.out.println() with explicit logging.
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-