类 AbstractUriTemplateHandler

    • 方法详细资料

      • setBaseUrl

        public void setBaseUrl​(String baseUrl)
        Configure a base URL to prepend URI templates with. The base URL must have a scheme and host but may optionally contain a port and a path. The base URL must be fully expanded and encoded which can be done via UriComponentsBuilder.
        参数:
        baseUrl - the base URL.
      • setDefaultUriVariables

        public void setDefaultUriVariables​(Map<String,​?> defaultUriVariables)
        Configure default URI variable values to use with every expanded URI template. These default values apply only when expanding with a Map, and not with an array, where the Map supplied to expand(String, Map) can override the default values.
        参数:
        defaultUriVariables - the default URI variable values
        从以下版本开始:
        4.3
      • expand

        public URI expand​(String uriTemplate,
                          Map<String,​?> uriVariables)
        从接口复制的说明: UriTemplateHandler
        Expand the given URI template from a map of URI variables.
        指定者:
        expand 在接口中 UriTemplateHandler
        参数:
        uriTemplate - the URI template string
        uriVariables - the URI variables
        返回:
        the resulting URI
      • expand

        public URI expand​(String uriTemplate,
                          Object... uriVariables)
        从接口复制的说明: UriTemplateHandler
        Expand the given URI template from an array of URI variables.
        指定者:
        expand 在接口中 UriTemplateHandler
        参数:
        uriTemplate - the URI template string
        uriVariables - the URI variable values
        返回:
        the resulting URI
      • expandInternal

        protected abstract URI expandInternal​(String uriTemplate,
                                              Object... uriVariables)
        Actually expand and encode the URI template.