クラス ParameterContentNegotiationStrategy

実装されたすべてのインターフェース:
ContentNegotiationStrategyMediaTypeFileExtensionResolver

public class ParameterContentNegotiationStrategy extends AbstractMappingContentNegotiationStrategy
クエリパラメーターからリクエストされたコンテンツ型を解決する戦略。デフォルトのクエリパラメーター名は「フォーマット」です。

キー(つまり、クエリパラメーターの期待値)と MediaType の間の静的マッピングを MappingMediaTypeFileExtensionResolver.addMapping(String, MediaType) を介して登録できます。5.0 以降、この戦略は MediaTypeFactory.getMediaType(org.springframework.core.io.Resource) によるキーの動的検索もサポートします。

導入:
3.2
作成者:
Rossen Stoyanchev
  • コンストラクターの詳細

    • ParameterContentNegotiationStrategy

      public ParameterContentNegotiationStrategy(MapSE<StringSE,MediaType> mediaTypes)
      ファイル拡張子とメディア型の指定されたマップでインスタンスを作成します。
  • メソッドの詳細