类 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

        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
    • 方法详细资料

      • getRootUri

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