public class RootUriTemplateHandler extends Object implements org.springframework.web.util.UriTemplateHandler
UriTemplateHandler
to set the root for URI that starts with '/'
.Modifier | Constructor and Description |
---|---|
|
RootUriTemplateHandler(String rootUri)
Create a new
RootUriTemplateHandler instance. |
|
RootUriTemplateHandler(String rootUri,
org.springframework.web.util.UriTemplateHandler handler)
Create a new
RootUriTemplateHandler instance. |
protected |
RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler) |
Modifier and Type | Method and Description |
---|---|
static RootUriTemplateHandler |
addTo(org.springframework.web.client.RestTemplate restTemplate,
String rootUri)
Add a
RootUriTemplateHandler instance to the given RestTemplate . |
URI |
expand(String uriTemplate,
Map<String,?> uriVariables) |
URI |
expand(String uriTemplate,
Object... uriVariables) |
String |
getRootUri() |
protected RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler)
public RootUriTemplateHandler(String rootUri)
RootUriTemplateHandler
instance.rootUri
- the root URI to be used to prefix relative URLspublic RootUriTemplateHandler(String rootUri, org.springframework.web.util.UriTemplateHandler handler)
RootUriTemplateHandler
instance.rootUri
- the root URI to be used to prefix relative URLshandler
- the delegate handlerpublic URI expand(String uriTemplate, Map<String,?> uriVariables)
expand
in interface org.springframework.web.util.UriTemplateHandler
public URI expand(String uriTemplate, Object... uriVariables)
expand
in interface org.springframework.web.util.UriTemplateHandler
public String getRootUri()
public static RootUriTemplateHandler addTo(org.springframework.web.client.RestTemplate restTemplate, String rootUri)
RootUriTemplateHandler
instance to the given RestTemplate
.restTemplate
- the RestTemplate
to add the handler torootUri
- the root URIRootUriTemplateHandler
.Copyright © 2017 Pivotal Software, Inc.. All rights reserved.