public interface RequestPath extends PathContainer
contextPath() と残りの pathWithinApplication() に細分化する PathContainer の特殊化。後者は通常、アプリケーション内のリクエストマッピングに使用されますが、前者は、アプリケーションを指す外部リンクを準備するときに役立ちます。PathContainer.Element, PathContainer.Options, PathContainer.PathSegment, PathContainer.Separator| 修飾子と型 | メソッドと説明 |
|---|---|
PathContainer | contextPath() アプリケーションを表す URL パスの一部を返します。 |
RequestPath | modifyContextPath(StringSE contextPath) コンテキストパスが変更された新しい RequestPath インスタンスを返します。 |
static RequestPath | parse(StringSE rawPath, StringSE contextPath) エンコードされた raw pathSE を使用した parse(URI, String) のバリアント。 |
static RequestPath | parse(URISE uri, StringSE contextPath) リクエストの URI を RequestPath に解析します。 |
PathContainer | pathWithinApplication() アプリケーション内のリクエストマッピングに通常使用されるコンテキストパスの後のリクエストパスの部分。 |
PathContainer contextPath()
コンテキストパスは、WAR としてサーブレットコンテナーにデプロイする場合など、基盤となるランタイム API から取得される場合と、ContextPathCompositeHandler を使用して WebFlux アプリケーションで割り当てられる場合があります。
PathContainer pathWithinApplication()
RequestPath modifyContextPath(StringSE contextPath)
RequestPath インスタンスを返します。新しいコンテキストパスは、開始時に 0 以上のパスセグメントと一致する必要があります。contextPath - 新しいコンテキストパス RequestPath インスタンス static RequestPath parse(URISE uri, @Nullable StringSE contextPath)
RequestPath に解析します。uri - リクエストの URIcontextPath - URI パスの contextPath 部分 static RequestPath parse(StringSE rawPath, @Nullable StringSE contextPath)
raw pathSE を使用した parse(URI, String) のバリアント。rawPath - パス contextPath - URI パスの contextPath 部分