类的使用
org.springframework.web.client.RestTemplate
使用RestTemplate的程序包 程序包 说明 org.springframework.test.web.client Contains client-side REST testing support.org.springframework.web.client Core package of the client-side web support.org.springframework.web.client.support Classes supporting theorg.springframework.web.clientpackage.org.springframework.test.web.client中RestTemplate的使用
参数类型为RestTemplate的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 static MockRestServiceServer.MockRestServiceServerBuilderMockRestServiceServer. bindTo(RestTemplate restTemplate)Return a builder for aMockRestServiceServerthat should be used to reply to the givenRestTemplate.static MockRestServiceServerMockRestServiceServer. createServer(RestTemplate restTemplate)A shortcut forbindTo(restTemplate).build().org.springframework.web.client中RestTemplate的使用
参数类型为RestTemplate的org.springframework.web.client中的构造器 构造器 说明 AsyncRestTemplate(AsyncClientHttpRequestFactory requestFactory, RestTemplate restTemplate)已过时。Create a new instance of theAsyncRestTemplateusing the givenAsyncClientHttpRequestFactoryand synchronousRestTemplate.org.springframework.web.client.support中RestTemplate的使用
返回RestTemplate的org.springframework.web.client.support中的方法 修饰符和类型 方法 说明 RestTemplateRestGatewaySupport. getRestTemplate()Returns theRestTemplatefor the gateway.参数类型为RestTemplate的org.springframework.web.client.support中的方法 修饰符和类型 方法 说明 voidRestGatewaySupport. setRestTemplate(RestTemplate restTemplate)Sets theRestTemplatefor the gateway.