接口 RequestPath
- 所有超级接口:
PathContainer
public interface RequestPath extends PathContainer
Represents the complete path for a request.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
嵌套类概要
从接口继承的嵌套类/接口 org.springframework.http.server.PathContainer
PathContainer.Element, PathContainer.Options, PathContainer.PathSegment, PathContainer.Separator
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 PathContainer
contextPath()
Returns the portion of the URL path that represents the application.RequestPath
modifyContextPath(String contextPath)
Return a newRequestPath
instance with a modified context path.static RequestPath
parse(URI uri, String contextPath)
Create a newRequestPath
with the given parameters.PathContainer
pathWithinApplication()
The portion of the request path after the context path.从接口继承的方法 org.springframework.http.server.PathContainer
elements, subPath, subPath, value
方法详细资料
contextPath
PathContainer 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
PathContainer pathWithinApplication()
The portion of the request path after the context path.
modifyContextPath
RequestPath modifyContextPath(String contextPath)
Return a newRequestPath
instance 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
RequestPath
instance
parse
static RequestPath parse(URI uri, @Nullable String contextPath)
Create a newRequestPath
with the given parameters.