From 7d747f9645d5194ac15b17bf6a50835d3ea7b326 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Fri, 7 Jul 2017 19:12:05 +0200 Subject: [PATCH] Deprecate AsyncRestTemplate methods in MockRestServiceServer --- .../test/web/client/MockRestServiceServer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java b/spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java index ce8fea41e4..cb93e67faa 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java @@ -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. - *

When set to "true" this is effectively a shortcut for:
+ *

Effectively a shortcut for:
* {@code builder.build(new UnorderedRequestExpectationManager)}. + *

By default this is set to {@code false} * @param ignoreExpectOrder whether to ignore the order of expectations */ MockRestServiceServerBuilder ignoreExpectOrder(boolean ignoreExpectOrder);