类 RootUriTemplateHandler
- java.lang.Object
- org.springframework.boot.web.client.RootUriTemplateHandler
- 所有已实现的接口:
org.springframework.web.util.UriTemplateHandler
public class RootUriTemplateHandler extends Object implements org.springframework.web.util.UriTemplateHandler
UriTemplateHandler
to set the root for URI that starts with'/'
.- 从以下版本开始:
- 1.4.0
构造器概要
构造器 限定符 构造器 说明 RootUriTemplateHandler(String rootUri)
Create a newRootUriTemplateHandler
instance.RootUriTemplateHandler(String rootUri, org.springframework.web.util.UriTemplateHandler handler)
Create a newRootUriTemplateHandler
instance.protected
RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler)
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static RootUriTemplateHandler
addTo(org.springframework.web.client.RestTemplate restTemplate, String rootUri)
Add aRootUriTemplateHandler
instance to the givenRestTemplate
.URI
expand(String uriTemplate, Object... uriVariables)
URI
expand(String uriTemplate, Map<String,?> uriVariables)
String
getRootUri()
构造器详细资料
RootUriTemplateHandler
protected RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler)
RootUriTemplateHandler
public RootUriTemplateHandler(String rootUri)
Create a newRootUriTemplateHandler
instance.- 参数:
rootUri
- the root URI to be used to prefix relative URLs
RootUriTemplateHandler
public RootUriTemplateHandler(String rootUri, org.springframework.web.util.UriTemplateHandler handler)
Create a newRootUriTemplateHandler
instance.- 参数:
rootUri
- the root URI to be used to prefix relative URLshandler
- the delegate handler
方法详细资料
expand
public URI expand(String uriTemplate, Map<String,?> uriVariables)
- 指定者:
expand
在接口中org.springframework.web.util.UriTemplateHandler
expand
public URI expand(String uriTemplate, Object... uriVariables)
- 指定者:
expand
在接口中org.springframework.web.util.UriTemplateHandler
getRootUri
public String getRootUri()
addTo
public static RootUriTemplateHandler addTo(org.springframework.web.client.RestTemplate restTemplate, String rootUri)
Add aRootUriTemplateHandler
instance to the givenRestTemplate
.- 参数:
restTemplate
- theRestTemplate
to add the handler torootUri
- the root URI- 返回:
- the added
RootUriTemplateHandler
.