クラス ContentNegotiationManager

java.lang.ObjectSE
org.springframework.web.accept.ContentNegotiationManager
実装されているすべてのインターフェース:
ContentNegotiationStrategy, MediaTypeFileExtensionResolver

public class ContentNegotiationManager extends ObjectSE implements ContentNegotiationStrategy, MediaTypeFileExtensionResolver
リクエストに対してリクエストされたメディア型を決定する主要クラス。これは、構成済みの ContentNegotiationStrategy インスタンスのリストに委譲することにより行われます。

また、メディア型のファイル拡張子を検索するメソッドも提供します。これは、構成済みの MediaTypeFileExtensionResolver インスタンスのリストに委譲することにより行われます。

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

    • ContentNegotiationManager

      public ContentNegotiationManager(ContentNegotiationStrategy... strategies)
      ContentNegotiationStrategy ストラテジーの指定されたリストを使用してインスタンスを作成します。各ストラテジーは MediaTypeFileExtensionResolver のインスタンスにもなります。
      パラメーター:
      strategies - 使用する戦略
    • ContentNegotiationManager

      public ContentNegotiationManager(CollectionSE<ContentNegotiationStrategy> strategies)
      ContentNegotiationManager(ContentNegotiationStrategy...) のコレクションベースの代替。
      パラメーター:
      strategies - 使用する戦略
      導入:
      3.2.2
    • ContentNegotiationManager

      public ContentNegotiationManager()
      HeaderContentNegotiationStrategy を使用してデフォルトのインスタンスを作成します。
  • メソッドの詳細