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. |
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 String getRootUri()
getRootUri
in class RootUriTemplateHandler
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.