类 LocalHostUriTemplateHandler
java.lang.Object
org.springframework.boot.web.client.RootUriTemplateHandler
org.springframework.boot.test.web.client.LocalHostUriTemplateHandler
- 所有已实现的接口:
UriTemplateHandler
UriTemplateHandler
will automatically prefix relative URIs with
localhost:${local.server.port}
.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb, Andy Wilkinson, Eddú Meléndez, Madhura Bhave
-
构造器概要
构造器构造器说明LocalHostUriTemplateHandler
(Environment environment) Create a newLocalHostUriTemplateHandler
that will generatehttp
URIs using the givenenvironment
to determine the context path and port.LocalHostUriTemplateHandler
(Environment environment, String scheme) Create a newLocalHostUriTemplateHandler
that will generate URIs with the givenscheme
and use the givenenvironment
to determine the context-path and port.LocalHostUriTemplateHandler
(Environment environment, String scheme, UriTemplateHandler handler) Create a newLocalHostUriTemplateHandler
that will generate URIs with the givenscheme
, use the givenenvironment
to determine the context-path and port and delegate to the given templatehandler
. -
方法概要
从类继承的方法 org.springframework.boot.web.client.RootUriTemplateHandler
expand, expand
-
构造器详细资料
-
LocalHostUriTemplateHandler
Create a newLocalHostUriTemplateHandler
that will generatehttp
URIs using the givenenvironment
to determine the context path and port.- 参数:
environment
- the environment used to determine the port
-
LocalHostUriTemplateHandler
Create a newLocalHostUriTemplateHandler
that will generate URIs with the givenscheme
and use the givenenvironment
to determine the context-path and port.- 参数:
environment
- the environment used to determine the portscheme
- the scheme of the root uri- 从以下版本开始:
- 1.4.1
-
LocalHostUriTemplateHandler
public LocalHostUriTemplateHandler(Environment environment, String scheme, UriTemplateHandler handler) Create a newLocalHostUriTemplateHandler
that will generate URIs with the givenscheme
, use the givenenvironment
to determine the context-path and port and delegate to the given templatehandler
.- 参数:
environment
- the environment used to determine the portscheme
- the scheme of the root urihandler
- the delegate handler- 从以下版本开始:
- 2.0.3
-
-
方法详细资料
-
getRootUri
- 覆盖:
getRootUri
在类中RootUriTemplateHandler
-