Commit Graph

19930 Commits

Author SHA1 Message Date
Sebastien Deleuze
7b861c9a8a Add defaultUseWrapper support to Jackson builder
Issue: SPR-13975
2016-03-02 00:03:25 +01:00
Phillip Webb
ffbf264976 Polish Javadoc 2016-03-01 13:34:25 -08:00
Sebastien Deleuze
379ce6354e Update for latest Reactor Core Snapshot 2016-03-01 22:19:54 +01:00
Sebastien Deleuze
dc52d4c31f Update for latest Reactor Core Snapshot 2016-03-01 22:07:54 +01:00
Stephane Maldini
14948d4241 sync reactor 2016-03-01 20:50:55 +00:00
Stephane Nicoll
b3b3fc5a7e Polish 2016-03-01 19:10:39 +01:00
Brian Clozel
3df66d023c Polish documentation on WebApplicationInitializer
Issue: SPR-13978
2016-03-01 17:38:52 +01:00
Brian Clozel
0d6f80052d Support conditional updates in ServletWebRequest
Prior to this commit, `ServletWebRequest.checkNotModified` would only
support conditional GET/HEAD requests with "If-Modified-Since" and/or
"If-None-Match" request headers. In those cases, the server would return
"HTTP 304 Not Modified" responses if the resource didn't change.

This commit adds support for conditional update requests, such as
POST/PUT/DELETE requests with "If-Unmodified-Since" request headers.
If the underlying resource has been modified since the specified date,
the server will return a "409 Precondition failed" response status
to prevent concurrent updates.

Even if the modification status of the resource is reversed here
(modified vs. not modified), we're keeping here the same intent for the
return value, which signals if the response requires more processing or
if the handler method can return immediately:

```
if (request.checkNotModified(lastModified)) {
  // shortcut exit - no further processing necessary
  return null;
}
```

Issue: SPR-13863
2016-03-01 14:37:29 +01:00
Sebastien Deleuze
b3abd3b809 Fix HeaderResultMatchers#string(String, String) assert order
Issue: SPR-14004
2016-03-01 14:18:29 +01:00
Sebastien Deleuze
c385427397 Allow to specify AbstractHttpMessageConverter default charset
Before this commit, specifying the charset to use with produces or
consumes @RequestMapping attributes resulted in default charset
loss. That was really annoying for JSON for example, where using
UTF-8 charset is mandatory in a lot of use cases.

This commit adds a defaultCharset property to
AbstractHttpMessageConverter in order to avoid losing the
default charset when specifying the charset with these
@RequestMapping attributes.

It changes slightly the default behavior (that's why we have waited
4.3), but it is much more error prone, and will match with most
user's expectations since the charset loss was accidental in most
use cases (users usually just want to limit the media type supported
by a specific handler method).

Issue: SPR-13631
2016-02-29 23:34:32 +01:00
Sam Brannen
61824b1ade Remove trailing whitespace from source code 2016-02-29 18:52:57 +01:00
Sam Brannen
2bb2657483 Merge pull request #981 from sbrannen/SPR-13992
* SPR-13992:
  Introduce composed annotations for @RequestMapping
2016-02-29 18:25:57 +01:00
Sam Brannen
467b5f3f28 Introduce composed annotations for @RequestMapping
This commit introduces the following common composed annotations for
@RequestMapping in Spring MVC and Spring MVC REST.

- @GetMapping
- @PostMapping
- @PutMapping
- @DeleteMapping
- @PatchMapping

Issue: SPR-13992
2016-02-29 18:22:30 +01:00
Stephane Nicoll
5923ee8af3 Add sun.misc annotation marker
This commit adds an annotation that should be used to mark any usage of
the `sun.misc` API.
2016-02-29 17:43:04 +01:00
Sam Brannen
161ec15a46 Merge pull request #982 from sbrannen/SPR-13993
* SPR-13993:
  Introduce composed annotations for web scopes
2016-02-29 17:41:43 +01:00
Sam Brannen
b423596b2e Introduce composed annotations for web scopes
This commit introduces the following common composed annotations for
web scopes.

- @RequestScope
- @SessionScope
- @ApplicationScope

Issue: SPR-13993
2016-02-29 17:38:46 +01:00
Sam Brannen
df7b24b8e7 Allow non-public @Transactional test methods
Prior to this commit, the TransactionalTestExecutionListener required
@Transactional test methods to be public; however, neither TestNG nor
JUnit 5 require that @Test methods are public. Consequently, non-public
transactional test methods silently run *without* a transaction.

This commit removes the 'public' restriction on transactional test
methods by setting the 'publicMethodsOnly' flag in
AnnotationTransactionAttributeSource to false.

Issue: SPR-14000
2016-02-29 15:30:22 +01:00
Sam Brannen
197434b3ec Polish TestNG integration tests 2016-02-29 15:30:22 +01:00
Sam Brannen
816185233d Polish TransactionalTestExecutionListener 2016-02-29 15:30:22 +01:00
Juergen Hoeller
a02fd7c995 RequestMappingHandlerAdapter properly invokes handler method in case of no session as well
Issue: SPR-13999
2016-02-29 15:05:50 +01:00
Juergen Hoeller
9c0f99c0b5 Polishing 2016-02-29 12:57:09 +01:00
Juergen Hoeller
8e5e384de7 Test for constructor with unresolvable parameter name
Issue: SPR-13987
2016-02-29 11:18:23 +01:00
Juergen Hoeller
1815a6a7eb RequestMappingHandlerAdapter properly invokes handler method in synchronizeOnSession mode again
Issue: SPR-13999
2016-02-29 11:12:11 +01:00
Sam Brannen
a2bfe86630 Support @[Before|After]Transaction on non-public methods
In order to align with the relaxed programming models of TestNG and the
upcoming JUnit 5 (with regard to method visibility), this commit
removes the requirement that @BeforeTransaction and @AfterTransaction
methods must be 'public'.

Issue: SPR-13997
2016-02-29 00:42:47 +01:00
Stephane Maldini
4197f002d8 Arrange WriteWithOperator to save some allocation cost with the same technique used by RSC and Reactor 2016-02-28 11:49:00 +00:00
Stephane Maldini
423a4852c5 use EmptySubscription 2016-02-28 11:29:46 +00:00
Stephane Maldini
fc1b2e96f7 Introduce Mono#justOrEmpty(T) 2016-02-28 00:56:10 +00:00
Stephane Maldini
999dfe3925 Sync BaseSubscriber 2016-02-27 23:18:22 +00:00
Sam Brannen
31e0386bcb Stop referencing deprecated @TransactionConfiguration in Javadoc 2016-02-27 23:50:00 +01:00
Sam Brannen
9d3dd1bc13 Introduce SpringRunner 'alias' for SpringJUnit4ClassRunner
This commit introduces a SpringRunner extension of
SpringJUnit4ClassRunner that is intended to be used as an 'alias' for
SpringJUnit4ClassRunner, primarily in order to simplify configuration
of JUnit 4 based integration tests.

Developers can use this alias as follows:

    @RunWith(SpringRunner.class)
    public class MySpringIntegrationTests { ... }

Issue: SPR-13954
2016-02-27 23:02:55 +01:00
Stephane Maldini
24d9e99de1 Sync toCompletableFuture 2016-02-27 21:36:31 +00:00
Stephane Maldini
cc77a338b1 Sync reactor-core jdk8 bump 2016-02-27 13:34:15 +00:00
Stephane Maldini
4c477189a6 revert module Reactor Fluxion to Reactor Stream 2016-02-27 11:06:07 +00:00
Stephane Maldini
9f94f8c88e Sync to Fluxion to remove Stream confusion 2016-02-26 21:42:52 +00:00
Sam Brannen
0c66838268 Polish Javadoc for @RequestMapping 2016-02-26 22:35:51 +01:00
Sam Brannen
6fcb6630d7 Clean up warnings in SampleAsyncTests 2016-02-26 22:35:51 +01:00
Juergen Hoeller
ab16053ed4 Redistribute AOP Alliance interfaces in spring-aop again (as in Spring 2.x)
Issue: SPR-13984
2016-02-26 12:40:00 +01:00
Juergen Hoeller
8a83af55b8 Consistent resolution of factory method exceptions
Issue: SPR-13985
2016-02-26 12:31:03 +01:00
Juergen Hoeller
7a32ce317c LinkedCaseInsensitiveMap provides reliable getOrDefault implementation
Issue: SPR-13981
2016-02-25 21:42:11 +01:00
Juergen Hoeller
b6dd8a9233 Consistent UnsatisfiedDependencyException exposure with injection point metadata
Issue: SPR-13968
2016-02-25 21:36:49 +01:00
Juergen Hoeller
4c964473b1 Defensively close jar files from non-cached JarURLConnections
Issue: SPR-6295
2016-02-25 10:25:13 +01:00
Rossen Stoyanchev
1bc1df2d0f Polish client-side REST updates
Issue: SPR-11365
2016-02-24 15:24:13 -05:00
Juergen Hoeller
ca19920d74 Refined ApplicationContextInitializer assignability exception 2016-02-24 17:50:14 +01:00
Juergen Hoeller
a68b910b7c TimerScheduledFuture correctly calculates getDelay result
Issue: SPR-13977
2016-02-24 17:11:36 +01:00
Rossen Stoyanchev
46189b48fc Merge client REST test support updates
Includes support to declare expecations should occur multiple
times as well as in any order.

Issue: SPR-11365
2016-02-23 23:33:59 -05:00
Rossen Stoyanchev
91872b0d74 Add ExpectedCount
MockRestServicesServer now supports an expect variant that accepts
a range of expected count of executions.

Issue: SPR-11365
2016-02-23 23:31:34 -05:00
Rossen Stoyanchev
08a08725be Allow plugging in custom RequestExpectationManager
The MockRestServiceServer builder now has an option to plug in a
custom RequestExpectationManager.

Issue: SPR-11365
2016-02-23 23:31:33 -05:00
Rossen Stoyanchev
a56c69c9ca Introduce MockRestServiceServer builder
MockRestServiceServer now provides static methods for builder-style
creation of MockRestServiceServer. This includes an option ignore
the order of declaration expected requests.

Issue: SPR-11365
2016-02-23 23:31:33 -05:00
Rossen Stoyanchev
f58ef24efd Introduce RequestExpectationManager
This commit factors out the logic to declare and manage expectations
including matching them to requests and verifying at the end behind
a commong abstraction.

MockRestServiceServer delegates to the new abstraction and is no longer
aware of how that's done. There are two implementations, one for
ordered and another for unordered expectation.

Issue: SPR-11365
2016-02-23 23:31:33 -05:00
Rossen Stoyanchev
37a3fa96d1 Separate ResponseActions from ClientHttpRequest
Before this commit RequestMatcherClientHttpRequest served both as
API to define request expectations, i.e. ResponseActions, as well as
the implementation of ClientHttpRequest representing actual requests.

DefaultResponseActions replaces this class as a simple holder of
expected requests and mock responses. MockRestServiceServer is then
responsible to match request expectations and create a mock response.

Issue: SPR-11365
2016-02-23 23:31:33 -05:00