インターフェースの使用
org.springframework.web.servlet.mvc.condition.RequestCondition
RequestCondition を使用するパッケージ
パッケージ
説明
条件に基づいて受信リクエストを照合するための一般的な MVC ロジック。
org.springframework.web.method パッケージに基づいた、ハンドラーメソッド処理用のサーブレットベースのインフラストラクチャ。org.springframework.web.method.annotation パッケージに基づいた、アノテーションベースのハンドラーメソッド処理のための MVC インフラストラクチャ。org.springframework.web.servlet.mvc.condition 内の RequestCondition 使用
修飾子と型クラス説明classAbstractRequestCondition<T extends AbstractRequestCondition<T>>class複数のRequestCondition型に委譲し、論理積(' && ')を使用してすべての条件が特定のリクエストに一致するようにすることにより、RequestCondition契約を実装します。final classリクエストの 'Content-Type' ヘッダーをメディア型式のリストに一致させるための論理和('| |')リクエスト条件。final classRequestMapping.headers()で定義された構文を持つヘッダー式のセットに対してリクエストを照合する論理論理積(' && ')リクエスト条件。final classRequestMapping.params()で定義された構文を使用して、設定されたパラメーター式に対してリクエストを照合する論理積(' && ')リクエスト条件。final class一連の URL パスパターンに対するリクエストと一致する論理和('| |')リクエスト条件。class非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。final classリクエストの 'Accept' ヘッダーをメディア型式のリストと照合するための論理和('| |')リクエスト条件。final classカスタム条件など、リクエスト条件の型が事前にわからない場合に便利なRequestConditionのホルダー。final classRequestMethodsのセットに対するリクエストと一致する論理和('| |')リクエスト条件。final classリクエストの API バージョンに基づいてマップするリクエスト条件。型 RequestCondition の引数を持つ型を返す org.springframework.web.servlet.mvc.condition のメソッド型 RequestCondition のパラメーターを持つ org.springframework.web.servlet.mvc.condition のコンストラクター修飾子コンストラクター説明CompositeRequestCondition(RequestCondition<?>... requestConditions) 0 個以上のRequestCondition型のインスタンスを作成します。RequestConditionHolder(@Nullable RequestCondition<?> requestCondition) 指定されたリクエスト条件をラップする新しいホルダーを作成します。org.springframework.web.servlet.mvc.method 内の RequestCondition 使用
修飾子と型メソッド説明<T> RequestCondition<T> RequestMappingInfo.getActivePatternsCondition()null でないかどうかに応じて、RequestMappingInfo.getPathPatternsCondition()またはRequestMappingInfo.getPatternsCondition()のいずれかを返します。RequestMappingInfo.getCustomCondition()このRequestMappingInfoまたはnullの「カスタム」条件を返します。型 RequestCondition のパラメーターを持つ org.springframework.web.servlet.mvc.method のメソッド修飾子と型メソッド説明RequestMappingInfo.addCustomCondition(RequestCondition<?> customCondition) 現在のインスタンスに基づいて新しいインスタンスを作成し、指定されたカスタム条件も追加します。RequestMappingInfo.Builder.customCondition(RequestCondition<?> condition) 使用するカスタム条件を設定します。型 RequestCondition のパラメーターを持つ org.springframework.web.servlet.mvc.method のコンストラクター修飾子コンストラクター説明RequestMappingInfo(@Nullable StringSE name, @Nullable PatternsRequestCondition patterns, @Nullable RequestMethodsRequestCondition methods, @Nullable ParamsRequestCondition params, @Nullable HeadersRequestCondition headers, @Nullable ConsumesRequestCondition consumes, @Nullable ProducesRequestCondition produces, @Nullable VersionRequestCondition version, @Nullable RequestCondition<?> custom) 使用すべきではありません。RequestMappingInfo.paths(String...)経由でRequestMappingInfo.Builderを使用することを推奨します。RequestMappingInfo(@Nullable PatternsRequestCondition patterns, @Nullable RequestMethodsRequestCondition methods, @Nullable ParamsRequestCondition params, @Nullable HeadersRequestCondition headers, @Nullable ConsumesRequestCondition consumes, @Nullable ProducesRequestCondition produces, @Nullable VersionRequestCondition version, @Nullable RequestCondition<?> custom) 使用すべきではありません。RequestMappingInfo.paths(String...)経由でRequestMappingInfo.Builderを使用することを推奨します。RequestMappingInfo(RequestMappingInfo info, @Nullable RequestCondition<?> customRequestCondition) 使用すべきではありません。RequestMappingInfo.addCustomCondition(RequestCondition)の使用を推奨する 5.3 以降。org.springframework.web.servlet.mvc.method.annotation 内の RequestCondition 使用
修飾子と型メソッド説明protected @Nullable RequestCondition<?> RequestMappingHandlerMapping.getCustomMethodCondition(MethodSE method) カスタムのメソッドレベルのリクエスト条件を指定します。protected @Nullable RequestCondition<?> RequestMappingHandlerMapping.getCustomTypeCondition(ClassSE<?> handlerType) カスタム型レベルのリクエスト条件を指定します。型 RequestCondition のパラメーターを持つ org.springframework.web.servlet.mvc.method.annotation のメソッド修飾子と型メソッド説明protected RequestMappingInfoRequestMappingHandlerMapping.createRequestMappingInfo(RequestMapping requestMapping, @Nullable RequestCondition<?> customCondition) 提供された@RequestMappingアノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfoを作成します。protected RequestMappingInfoRequestMappingHandlerMapping.createRequestMappingInfo(HttpExchange httpExchange, @Nullable RequestCondition<?> customCondition) 提供された@HttpExchangeアノテーション、メタアノテーション、またはアノテーション階層内でアノテーション属性をマージした合成結果からRequestMappingInfoを作成します。
PathMatcherおよびUrlPathHelperの使用は、Web モジュールでの実行時の使用では非推奨となり、代わりにPathPatternParserによる解析パターンが推奨されます。