Deprecate AsyncRestTemplate methods in MockRestServiceServer

This commit is contained in:
Rossen Stoyanchev
2017-07-07 19:12:05 +02:00
parent 9640cedeae
commit 7d747f9645

View File

@@ -136,7 +136,10 @@ public class MockRestServiceServer {
* Return a builder for a {@code MockRestServiceServer} that should be used
* to reply to the given {@code AsyncRestTemplate}.
* @since 4.3
* @deprecated see deprecation notice on
* {@link org.springframework.web.client.AsyncRestTemplate} itself
*/
@Deprecated
public static MockRestServiceServerBuilder bindTo(org.springframework.web.client.AsyncRestTemplate asyncRestTemplate) {
return new DefaultBuilder(asyncRestTemplate);
}
@@ -165,7 +168,10 @@ public class MockRestServiceServer {
* A shortcut for {@code bindTo(asyncRestTemplate).build()}.
* @param asyncRestTemplate the AsyncRestTemplate to set up for mock testing
* @return the created mock server
* @deprecated see deprecation notice on
* {@link org.springframework.web.client.AsyncRestTemplate} itself
*/
@Deprecated
public static MockRestServiceServer createServer(org.springframework.web.client.AsyncRestTemplate asyncRestTemplate) {
return bindTo(asyncRestTemplate).build();
}
@@ -188,8 +194,9 @@ public class MockRestServiceServer {
/**
* Whether to allow expected requests to be executed in any order not
* necessarily matching the order of declaration.
* <p>When set to "true" this is effectively a shortcut for:<br>
* <p>Effectively a shortcut for:<br>
* {@code builder.build(new UnorderedRequestExpectationManager)}.
* <p>By default this is set to {@code false}
* @param ignoreExpectOrder whether to ignore the order of expectations
*/
MockRestServiceServerBuilder ignoreExpectOrder(boolean ignoreExpectOrder);