Class RootUriTemplateHandler

java.lang.Object
org.springframework.boot.web.client.RootUriTemplateHandler
All Implemented Interfaces:
org.springframework.web.util.UriTemplateHandler
Direct Known Subclasses:
RootUriBuilderFactory

public class RootUriTemplateHandler extends Object implements org.springframework.web.util.UriTemplateHandler
UriTemplateHandler to set the root for URI that starts with '/'.
Since:
1.4.0
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.2.3 for removal in 3.4.0, with no replacement
     
    RootUriTemplateHandler(String rootUri, org.springframework.web.util.UriTemplateHandler handler)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.2.3 for removal in 3.4.0, with no replacement
    protected
    RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addTo(org.springframework.web.client.RestTemplate restTemplate, String rootUri)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.2.3 for removal in 3.4.0, with no replacement
    expand(String uriTemplate, Object... uriVariables)
     
    expand(String uriTemplate, Map<String,?> uriVariables)
     
     
    withHandlerWrapper(Function<org.springframework.web.util.UriTemplateHandler,org.springframework.web.util.UriTemplateHandler> wrapper)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.2.3 for removal in 3.4.0, with no replacement

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RootUriTemplateHandler

      protected RootUriTemplateHandler(org.springframework.web.util.UriTemplateHandler handler)
    • RootUriTemplateHandler

      @Deprecated(since="3.2.3", forRemoval=true) public RootUriTemplateHandler(String rootUri)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.2.3 for removal in 3.4.0, with no replacement
      Create a new RootUriTemplateHandler instance.
      Parameters:
      rootUri - the root URI to be used to prefix relative URLs
    • RootUriTemplateHandler

      @Deprecated(since="3.2.3", forRemoval=true) public RootUriTemplateHandler(String rootUri, org.springframework.web.util.UriTemplateHandler handler)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.2.3 for removal in 3.4.0, with no replacement
      Create a new RootUriTemplateHandler instance.
      Parameters:
      rootUri - the root URI to be used to prefix relative URLs
      handler - the handler handler
  • Method Details

    • expand

      public URI expand(String uriTemplate, Map<String,?> uriVariables)
      Specified by:
      expand in interface org.springframework.web.util.UriTemplateHandler
    • expand

      public URI expand(String uriTemplate, Object... uriVariables)
      Specified by:
      expand in interface org.springframework.web.util.UriTemplateHandler
    • getRootUri

      public String getRootUri()
    • withHandlerWrapper

      @Deprecated(since="3.2.3", forRemoval=true) public RootUriTemplateHandler withHandlerWrapper(Function<org.springframework.web.util.UriTemplateHandler,org.springframework.web.util.UriTemplateHandler> wrapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.2.3 for removal in 3.4.0, with no replacement
      Derives a new RootUriTemplateHandler from this one, wrapping its delegate UriTemplateHandler by applying the given wrapper.
      Parameters:
      wrapper - the wrapper to apply to the delegate URI template handler
      Returns:
      the new handler
      Since:
      2.3.10
    • addTo

      @Deprecated(since="3.2.3", forRemoval=true) public static RootUriTemplateHandler addTo(org.springframework.web.client.RestTemplate restTemplate, String rootUri)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.2.3 for removal in 3.4.0, with no replacement
      Add a RootUriTemplateHandler instance to the given RestTemplate.
      Parameters:
      restTemplate - the RestTemplate to add the handler to
      rootUri - the root URI
      Returns:
      the added RootUriTemplateHandler.