public class LocalHostUriTemplateHandler extends RootUriTemplateHandler
UriTemplateHandler
will automatically prefix relative URIs with
localhost:${local.server.port}
.Constructor and Description |
---|
LocalHostUriTemplateHandler(Environment environment)
Create a new
LocalHostUriTemplateHandler that will generate http
URIs using the given environment to determine the context path and port. |
LocalHostUriTemplateHandler(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(Environment environment,
String scheme,
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, withHandlerWrapper
public LocalHostUriTemplateHandler(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(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(Environment environment, String scheme, 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