类的使用
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.client
package.org.springframework.test.web.client中RestTemplate的使用
参数类型为RestTemplate的org.springframework.test.web.client中的方法 修饰符和类型 方法 说明 static MockRestServiceServer.MockRestServiceServerBuilder
MockRestServiceServer. bindTo(RestTemplate restTemplate)
Return a builder for aMockRestServiceServer
that should be used to reply to the givenRestTemplate
.static MockRestServiceServer
MockRestServiceServer. 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 theAsyncRestTemplate
using the givenAsyncClientHttpRequestFactory
and synchronousRestTemplate
.org.springframework.web.client.support中RestTemplate的使用
返回RestTemplate的org.springframework.web.client.support中的方法 修饰符和类型 方法 说明 RestTemplate
RestGatewaySupport. getRestTemplate()
Returns theRestTemplate
for the gateway.参数类型为RestTemplate的org.springframework.web.client.support中的方法 修饰符和类型 方法 说明 void
RestGatewaySupport. setRestTemplate(RestTemplate restTemplate)
Sets theRestTemplate
for the gateway.