类 LocalHostUriTemplateHandler

  • 所有已实现的接口:
    org.springframework.web.util.UriTemplateHandler

    public class LocalHostUriTemplateHandler
    extends org.springframework.boot.web.client.RootUriTemplateHandler
    UriTemplateHandler will automatically prefix relative URIs with localhost:${local.server.port}.
    从以下版本开始:
    1.4.0
    • 构造器概要

      构造器 
      构造器说明
      LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment)
      Create a new LocalHostUriTemplateHandler that will generate http URIs using the given environment to determine the context path and port.
      LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment, String scheme)
      Create a new LocalHostUriTemplateHandler that will generate URIs with the given scheme and use the given environment to determine the context-path and port.
      LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment, String scheme, org.springframework.web.util.UriTemplateHandler handler)
      Create a new LocalHostUriTemplateHandler that will generate URIs with the given scheme, use the given environment to determine the context-path and port and delegate to the given template handler.
    • 构造器详细资料

      • LocalHostUriTemplateHandler

        public LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment)
        Create a new LocalHostUriTemplateHandler that will generate http URIs using the given environment to determine the context path and port.
        参数:
        environment - the environment used to determine the port
      • LocalHostUriTemplateHandler

        public LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment,
                                           String scheme)
        Create a new LocalHostUriTemplateHandler that will generate URIs with the given scheme and use the given environment to determine the context-path and port.
        参数:
        environment - the environment used to determine the port
        scheme - the scheme of the root uri
        从以下版本开始:
        1.4.1
      • LocalHostUriTemplateHandler

        public LocalHostUriTemplateHandler​(org.springframework.core.env.Environment environment,
                                           String scheme,
                                           org.springframework.web.util.UriTemplateHandler handler)
        Create a new LocalHostUriTemplateHandler that will generate URIs with the given scheme, use the given environment to determine the context-path and port and delegate to the given template handler.
        参数:
        environment - the environment used to determine the port
        scheme - the scheme of the root uri
        handler - the delegate handler
        从以下版本开始:
        2.0.3
    • 方法详细资料

      • getRootUri

        public String getRootUri()
        覆盖:
        getRootUri 在类中 org.springframework.boot.web.client.RootUriTemplateHandler