类 RequestPath
java.lang.Object
cn.taketoday.http.server.PathContainer
cn.taketoday.http.server.RequestPath
Specialization of
PathContainer that sub-divides the path into a
contextPath() and the remaining pathWithinApplication().
The latter is typically used for request mapping within the application
while the former is useful when preparing external links that point back to
the application.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.http.server.PathContainer
PathContainer.Element, PathContainer.Options, PathContainer.PathSegment, PathContainer.Separator -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract PathContainerReturns the portion of the URL path that represents the application.abstract RequestPathmodifyContextPath(String contextPath) Return a newRequestPathinstance with a modified context path.static RequestPathVariant ofparse(URI, String)with the encodedraw path.static RequestPathParse the URI for a request into aRequestPath.abstract PathContainerThe portion of the request path after the context path which is typically used for request mapping within the application .
-
构造器详细资料
-
RequestPath
public RequestPath()
-
-
方法详细资料
-
contextPath
Returns the portion of the URL path that represents the application. The context path is always at the beginning of the path and starts but does not end with "/". It is shared for URLs of the same application.The context path may come from the underlying runtime API such as when deploying as a WAR to a Servlet container or it may be assigned in a WebFlux application through the use of
ContextPathCompositeHandler. -
pathWithinApplication
The portion of the request path after the context path which is typically used for request mapping within the application . -
modifyContextPath
Return a newRequestPathinstance with a modified context path. The new context path must match 0 or more path segments at the start.- 参数:
contextPath- the new context path- 返回:
- a new
RequestPathinstance
-
parse
Parse the URI for a request into aRequestPath.- 参数:
uri- the URI of the requestcontextPath- the contextPath portion of the URI path
-
parse
Variant ofparse(URI, String)with the encodedraw path.- 参数:
rawPath- the pathcontextPath- the contextPath portion of the URI path
-