public class LocalHostUriTemplateHandler extends RootUriTemplateHandler
UriTemplateHandler
will automatically prefix relative URIs with
localhost:${local.server.port}
.Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
String |
getRootUri() |
addTo, expand, expand
public LocalHostUriTemplateHandler(org.springframework.core.env.Environment environment)
LocalHostUriTemplateHandler
that will generate http
URIs using the given environment
to determine the context path and port.environment
- the environment used to determine the portpublic LocalHostUriTemplateHandler(org.springframework.core.env.Environment environment, String scheme)
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 portscheme
- the scheme of the root uripublic LocalHostUriTemplateHandler(org.springframework.core.env.Environment environment, String scheme, org.springframework.web.util.UriTemplateHandler handler)
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 portscheme
- the scheme of the root urihandler
- the delegate handlerpublic String getRootUri()
getRootUri
in class RootUriTemplateHandler
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.