类 RootUriRequestExpectationManager

java.lang.Object
org.springframework.boot.test.web.client.RootUriRequestExpectationManager
所有已实现的接口:
RequestExpectationManager

public class RootUriRequestExpectationManager extends Object implements RequestExpectationManager
RequestExpectationManager that strips the specified root URI from the request before verification. Can be used to simply test declarations when all REST calls start the same way. For example:
 RestTemplate restTemplate = new RestTemplateBuilder().rootUri("https://example.com").build();
 MockRestServiceServer server = RootUriRequestExpectationManager.bindTo(restTemplate);
 server.expect(requestTo("/hello")).andRespond(withSuccess());
 restTemplate.getForEntity("/hello", String.class);
 
从以下版本开始:
1.4.0
作者:
Phillip Webb
另请参阅: