クラスの使用
org.springframework.web.accept.ContentNegotiationManager
ContentNegotiationManager を使用するパッケージ
パッケージ
説明
ビルトイン
MockMvcBuilder 実装が含まれています。 このパッケージには、リクエストでリクエストされたメディア型を判別するために使用されるクラスが含まれています。
Spring MVC のアノテーションベースのセットアップ。
条件に基づいて受信リクエストを照合するための一般的な MVC ロジック。
org.springframework.web.method パッケージに基づいた、ハンドラーメソッド処理用のサーブレットベースのインフラストラクチャ。org.springframework.web.method.annotation パッケージに基づいた、アノテーションベースのハンドラーメソッド処理のための MVC インフラストラクチャ。 カスタム実装の抽象基本クラスを含む、標準の View および ViewResolver 実装を提供します。
org.springframework.test.web.servlet.client 内の ContentNegotiationManager 使用
型 ContentNegotiationManager のパラメーターを持つ org.springframework.test.web.servlet.client のメソッド修飾子と型メソッド説明MockMvcWebTestClient.ControllerSpec.contentNegotiationManager(ContentNegotiationManager manager) ContentNegotiationManager を設定します。org.springframework.test.web.servlet.setup 内の ContentNegotiationManager 使用
型 ContentNegotiationManager のパラメーターを持つ org.springframework.test.web.servlet.setup のメソッド修飾子と型メソッド説明StandaloneMockMvcBuilder.setContentNegotiationManager(ContentNegotiationManager manager) ContentNegotiationManager を設定します。org.springframework.web.accept 内の ContentNegotiationManager 使用
ContentNegotiationManager 型の型引数を持つインターフェースを実装する org.springframework.web.accept のクラス修飾子と型メソッド説明ContentNegotiationManagerFactoryBean.build()ContentNegotiationManagerインスタンスを作成して初期化します。ContentNegotiationManagerFactoryBean.getObject()org.springframework.web.servlet.config.annotation 内の ContentNegotiationManager 使用
修飾子と型メソッド説明protected ContentNegotiationManagerContentNegotiationConfigurer.buildContentNegotiationManager()この設定の設定に基づいてContentNegotiationManagerを構築します。WebMvcConfigurationSupport.mvcContentNegotiationManager()指定されたリクエストでリクエストされたメディア型を判別するために使用するContentNegotiationManagerインスタンスを返します。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.config.annotation のメソッド修飾子と型メソッド説明protected final voidWebMvcConfigurationSupport.addDefaultHandlerExceptionResolvers(ListSE<HandlerExceptionResolver> exceptionResolvers, ContentNegotiationManager mvcContentNegotiationManager) デフォルトのHandlerExceptionResolversを追加するためにサブクラスで使用できるメソッド。WebMvcConfigurationSupport.handlerExceptionResolver(ContentNegotiationManager contentNegotiationManager) WebMvcConfigurationSupport.mvcViewResolver(ContentNegotiationManager contentNegotiationManager) ビューの解決に使用するビューリゾルバーのチェーンを含むViewResolverCompositeを登録します。WebMvcConfigurationSupport.requestMappingHandlerAdapter(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, Validator validator) アノテーション付きコントローラーメソッドを介してリクエストを処理するためのRequestMappingHandlerAdapterを返します。WebMvcConfigurationSupport.requestMappingHandlerMapping(ContentNegotiationManager contentNegotiationManager, @Nullable ApiVersionStrategy apiVersionStrategy, FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) リクエストをアノテーション付きコントローラーにマッピングするために、0 で順序付けされたRequestMappingHandlerMappingを返します。WebMvcConfigurationSupport.resourceHandlerMapping(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) リソースハンドラーがマップされた Integer.MAX_VALUE-1 で順序付けられたハンドラーマッピングを返します。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.config.annotation のコンストラクター修飾子コンストラクター説明ResourceHandlerRegistry(ApplicationContext applicationContext, jakarta.servlet.ServletContext servletContext, @Nullable ContentNegotiationManager contentNegotiationManager) 指定されたアプリケーションコンテキストの新しいリソースハンドラーレジストリを作成します。ResourceHandlerRegistry(ApplicationContext applicationContext, jakarta.servlet.ServletContext servletContext, @Nullable ContentNegotiationManager contentNegotiationManager, @Nullable UrlPathHelper pathHelper) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。ViewResolverRegistry(ContentNegotiationManager contentNegotiationManager, @Nullable ApplicationContext context) ContentNegotiationManagerおよびApplicationContextのクラスコンストラクター。org.springframework.web.servlet.mvc.condition 内の ContentNegotiationManager 使用
型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.mvc.condition のコンストラクター修飾子コンストラクター説明ProducesRequestCondition(StringSE @Nullable [] produces, StringSE @Nullable [] headers, @Nullable ContentNegotiationManager manager) org.springframework.web.servlet.mvc.method 内の ContentNegotiationManager 使用
修飾子と型メソッド説明RequestMappingInfo.BuilderConfiguration.getContentNegotiationManager()ProducesRequestCondition に使用する ContentNegotiationManager を返します(ある場合)。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.mvc.method のメソッド修飾子と型メソッド説明voidRequestMappingInfo.BuilderConfiguration.setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) ProducesRequestCondition に使用する ContentNegotiationManager を設定します。org.springframework.web.servlet.mvc.method.annotation 内の ContentNegotiationManager 使用
修飾子と型メソッド説明ExceptionHandlerExceptionResolver.getContentNegotiationManager()設定されたContentNegotiationManagerを返します。RequestMappingHandlerMapping.getContentNegotiationManager()設定されたContentNegotiationManagerを返します。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.mvc.method.annotation のメソッド修飾子と型メソッド説明voidExceptionHandlerExceptionResolver.setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) リクエストされたメディア型を判別するために使用するContentNegotiationManagerを設定します。voidRequestMappingHandlerAdapter.setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) リクエストされたメディア型を判別するために使用するContentNegotiationManagerを設定します。voidRequestMappingHandlerMapping.setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) リクエストされたメディア型を判別するために使用するContentNegotiationManagerを設定します。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.mvc.method.annotation のコンストラクター修飾子コンストラクター説明protectedAbstractMessageConverterMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager contentNegotiationManager) 提供されたコンバーターのリストとContentNegotiationManagerを使用して構築します。protectedAbstractMessageConverterMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, @Nullable ListSE<ObjectSE> requestResponseBodyAdvice) 戻り値の処理用にrequestResponseBodyAdviceリストが追加されたAbstractMessageConverterMethodProcessor(List, ContentNegotiationManager)のバリアント。protectedAbstractMessageConverterMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, @Nullable ListSE<ObjectSE> requestResponseBodyAdvice, ListSE<ErrorResponse.Interceptor> interceptors) 戻り値の処理用にErrorResponse.Interceptorのリストを追加したAbstractMessageConverterMethodProcessor(List, ContentNegotiationManager, List)のバリアント。HttpEntityMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, ListSE<ObjectSE> requestResponseBodyAdvice) 戻り値の処理用にContentNegotiationManager引数を追加したHttpEntityMethodProcessor(List, List)のバリアント。HttpEntityMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, ListSE<ObjectSE> requestResponseBodyAdvice, ListSE<ErrorResponse.Interceptor> interceptors) 戻り値の処理用にErrorResponse.Interceptorのリストを追加したHttpEntityMethodProcessor(List, ContentNegotiationManager, List)のバリアント。HttpEntityMethodProcessor(ListSE<HttpMessageConverter<?>> converters, ContentNegotiationManager manager) コンバーターとContentNegotiationManagerを使用した基本コンストラクター。RequestResponseBodyMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager) コンバーターとContentNegotiationManagerを使用した基本コンストラクター。RequestResponseBodyMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, @Nullable ListSE<ObjectSE> requestResponseBodyAdvice) 戻り値の処理用に、追加のContentNegotiationManager引数を持つRequestResponseBodyMethodProcessor(List, List)のバリアント。RequestResponseBodyMethodProcessor(ListSE<HttpMessageConverter<?>> converters, @Nullable ContentNegotiationManager manager, ListSE<ObjectSE> requestResponseBodyAdvice, ListSE<ErrorResponse.Interceptor> interceptors) 戻り値の処理用にErrorResponse.Interceptor引数を追加したRequestResponseBodyMethodProcessor(List, ContentNegotiationManager, List)のバリアント。ResponseBodyEmitterReturnValueHandler(ListSE<HttpMessageConverter<?>> messageConverters, ReactiveAdapterRegistry registry, TaskExecutor executor, ContentNegotiationManager manager) 「リアクティブ」型のサポートをカスタマイズするための引数が追加されたコンストラクター。ResponseBodyEmitterReturnValueHandler(ListSE<HttpMessageConverter<?>> messageConverters, ReactiveAdapterRegistry registry, TaskExecutor executor, ContentNegotiationManager manager, ListSE<ViewResolver> viewResolvers, @Nullable LocaleResolver localeResolver) ビューのレンダリング用の引数が追加されたコンストラクター。org.springframework.web.servlet.view 内の ContentNegotiationManager 使用
修飾子と型メソッド説明ContentNegotiatingViewResolver.getContentNegotiationManager()リクエストされたメディア型を判別するために使用するContentNegotiationManagerを返します。型 ContentNegotiationManager のパラメーターを持つ org.springframework.web.servlet.view のメソッド修飾子と型メソッド説明voidContentNegotiatingViewResolver.setContentNegotiationManager(@Nullable ContentNegotiationManager contentNegotiationManager) リクエストされたメディア型を判別するために使用するContentNegotiationManagerを設定します。
ResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager)を推奨