public class WebFluxConfigurationSupport extends ObjectSE implements ApplicationContextAware
直接インポートするか、protected メソッドを継承およびオーバーライドしてカスタマイズします。
コンストラクターと説明 |
---|
WebFluxConfigurationSupport() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setApplicationContext(@Nullable ApplicationContext applicationContext)
ApplicationContextAware
通常の Bean プロパティの設定後、ただし InitializingBean.afterPropertiesSet()
またはカスタム init メソッドなどの init コールバックの前に呼び出されます。ResourceLoaderAware.setResourceLoader(org.springframework.core.io.ResourceLoader)
、ApplicationEventPublisherAware.setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
および MessageSourceAware
の後に呼び出されます(該当する場合)。
ApplicationContextAware
の setApplicationContext
applicationContext
- このオブジェクトによって使用される ApplicationContext オブジェクト BeanInitializationException
@Nullable public final ApplicationContext getApplicationContext()
@Bean public DispatcherHandler webHandler()
@Bean @Order(value=0) public WebExceptionHandler responseStatusExceptionHandler()
@Bean public RequestMappingHandlerMapping requestMappingHandlerMapping()
protected RequestMappingHandlerMapping createRequestMappingHandlerMapping()
RequestMappingHandlerMapping
のサブクラスをプラグインします。@Bean public RequestedContentTypeResolver webFluxContentTypeResolver()
protected void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
protected final MapSE<StringSE,CorsConfiguration> getCorsConfigurations()
addCorsMappings(CorsRegistry)
を使用します。protected void addCorsMappings(CorsRegistry registry)
CorsRegistry
protected final PathMatchConfigurer getPathMatchConfigurer()
PathMatchConfigurer
をビルドするためのコールバック。この方法は最終的なものであり、configurePathMatching(org.springframework.web.reactive.config.PathMatchConfigurer)
を使用してパスマッチングをカスタマイズします。public void configurePathMatching(PathMatchConfigurer configurer)
@Bean public RouterFunctionMapping routerFunctionMapping()
protected RouterFunctionMapping createRouterFunctionMapping()
RouterFunctionMapping
のサブクラスをプラグインします。@Bean public HandlerMapping resourceHandlerMapping()
addResourceHandlers(org.springframework.web.reactive.config.ResourceHandlerRegistry)
をオーバーライドします。@Bean public ResourceUrlProvider resourceUrlProvider()
protected void addResourceHandlers(ResourceHandlerRegistry registry)
@Bean public RequestMappingHandlerAdapter requestMappingHandlerAdapter()
protected RequestMappingHandlerAdapter createRequestMappingHandlerAdapter()
RequestMappingHandlerAdapter
のサブクラスをプラグインします。protected void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
@Bean public ServerCodecConfigurer serverCodecConfigurer()
configureHttpMessageCodecs(ServerCodecConfigurer)
を使用して、リーダーとライターを構成します。
protected LocaleContextResolver createLocaleContextResolver()
LocaleContextResolver
のサブクラスをプラグインします。@Bean public LocaleContextResolver localeContextResolver()
protected void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
protected ConfigurableWebBindingInitializer getConfigurableWebBindingInitializer()
WebDataBinder
インスタンスの初期化に使用する ConfigurableWebBindingInitializer
を返します。@Bean public FormattingConversionService webFluxConversionService()
FormattingConversionService
を返します。 このメソッドをオーバーライドする代わりの方法として addFormatters(org.springframework.format.FormatterRegistry)
を参照してください。
protected void addFormatters(FormatterRegistry registry)
@Bean public ReactiveAdapterRegistry webFluxAdapterRegistry()
ReactiveAdapterRegistry
を返します。@Bean public Validator webFluxValidator()
@RequestBody
メソッドの引数を検証するために、グローバル Validator
インスタンスを返します。 最初に getValidator()
にデリゲートします。それが null
を返す場合、OptionalValidatorFactoryBean
を作成する前に、JSR-303 実装の存在についてクラスパスをチェックします。JSR-303 実装が利用できない場合、"no-op" Validator
が返されます。
@Nullable protected MessageCodesResolver getMessageCodesResolver()
MessageCodesResolver
を提供します。@Bean public HandlerFunctionAdapter handlerFunctionAdapter()
@Bean public SimpleHandlerAdapter simpleHandlerAdapter()
@Bean public ResponseEntityResultHandler responseEntityResultHandler()
@Bean public ResponseBodyResultHandler responseBodyResultHandler()
@Bean public ViewResolutionResultHandler viewResolutionResultHandler()
@Bean public ServerResponseResultHandler serverResponseResultHandler()
protected final ViewResolverRegistry getViewResolverRegistry()
ViewResolverRegistry
をビルドするためのコールバック。このメソッドは最終的なものであり、configureViewResolvers(org.springframework.web.reactive.config.ViewResolverRegistry)
を使用してビューリゾルバーをカスタマイズします。protected void configureViewResolvers(ViewResolverRegistry registry)
ViewResolverRegistry