Package org.springframework.http.server
Interface RequestPath
- All Superinterfaces:
- PathContainer
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.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.http.server.PathContainerPathContainer.Element, PathContainer.Options, PathContainer.PathSegment, PathContainer.Separator
- 
Method SummaryModifier and TypeMethodDescriptionReturns the portion of the URL path that represents the application.modifyContextPath(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.The portion of the request path after the context path which is typically used for request mapping within the application .Methods inherited from interface org.springframework.http.server.PathContainerelements, subPath, subPath, value
- 
Method Details- 
contextPathPathContainer 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.
- 
pathWithinApplicationPathContainer pathWithinApplication()The portion of the request path after the context path which is typically used for request mapping within the application .
- 
modifyContextPathReturn a newRequestPathinstance with a modified context path. The new context path must match 0 or more path segments at the start.- Parameters:
- contextPath- the new context path
- Returns:
- a new RequestPathinstance
 
- 
parseParse the URI for a request into aRequestPath.- Parameters:
- uri- the URI of the request
- contextPath- the contextPath portion of the URI path
 
- 
parseVariant ofparse(URI, String)with the encodedraw path.- Parameters:
- rawPath- the path
- contextPath- the contextPath portion of the URI path
- Since:
- 5.3
 
 
-