Skip to content

Commit 7d747f9

Browse files
committed
Deprecate AsyncRestTemplate methods in MockRestServiceServer
1 parent 9640ced commit 7d747f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spring-test/src/main/java/org/springframework/test/web/client/MockRestServiceServer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ public static MockRestServiceServerBuilder bindTo(RestTemplate restTemplate) {
136136
* Return a builder for a {@code MockRestServiceServer} that should be used
137137
* to reply to the given {@code AsyncRestTemplate}.
138138
* @since 4.3
139+
* @deprecated see deprecation notice on
140+
* {@link org.springframework.web.client.AsyncRestTemplate} itself
139141
*/
142+
@Deprecated
140143
public static MockRestServiceServerBuilder bindTo(org.springframework.web.client.AsyncRestTemplate asyncRestTemplate) {
141144
return new DefaultBuilder(asyncRestTemplate);
142145
}
@@ -165,7 +168,10 @@ public static MockRestServiceServer createServer(RestTemplate restTemplate) {
165168
* A shortcut for {@code bindTo(asyncRestTemplate).build()}.
166169
* @param asyncRestTemplate the AsyncRestTemplate to set up for mock testing
167170
* @return the created mock server
171+
* @deprecated see deprecation notice on
172+
* {@link org.springframework.web.client.AsyncRestTemplate} itself
168173
*/
174+
@Deprecated
169175
public static MockRestServiceServer createServer(org.springframework.web.client.AsyncRestTemplate asyncRestTemplate) {
170176
return bindTo(asyncRestTemplate).build();
171177
}
@@ -188,8 +194,9 @@ public interface MockRestServiceServerBuilder {
188194
/**
189195
* Whether to allow expected requests to be executed in any order not
190196
* necessarily matching the order of declaration.
191-
* <p>When set to "true" this is effectively a shortcut for:<br>
197+
* <p>Effectively a shortcut for:<br>
192198
* {@code builder.build(new UnorderedRequestExpectationManager)}.
199+
* <p>By default this is set to {@code false}
193200
* @param ignoreExpectOrder whether to ignore the order of expectations
194201
*/
195202
MockRestServiceServerBuilder ignoreExpectOrder(boolean ignoreExpectOrder);

0 commit comments

Comments
 (0)