Class DelegatingWebFluxConfiguration
- java.lang.Object
- org.springframework.web.reactive.config.WebFluxConfigurationSupport
- org.springframework.web.reactive.config.DelegatingWebFluxConfiguration
- All Implemented Interfaces:
Aware,ApplicationContextAware
@Configuration(proxyBeanMethods=false) public class DelegatingWebFluxConfiguration extends WebFluxConfigurationSupport
A subclass ofWebFluxConfigurationSupportthat detects and delegates to all beans of typeWebFluxConfigurerallowing them to customize the configuration provided byWebFluxConfigurationSupport. This is the class actually imported by@EnableWebFlux.- Since:
- 5.0
- Author:
- Brian Clozel
Constructor Summary
Constructors Constructor Description DelegatingWebFluxConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCorsMappings(CorsRegistry registry)Override this method to configure cross origin requests processing.protected voidaddFormatters(FormatterRegistry registry)Override this method to add customConverterand/orFormatterdelegates to the commonFormattingConversionService.protected voidaddResourceHandlers(ResourceHandlerRegistry registry)Override this method to add resource handlers for serving static resources.protected voidconfigureArgumentResolvers(ArgumentResolverConfigurer configurer)Configure resolvers for custom controller method arguments.protected voidconfigureContentTypeResolver(RequestedContentTypeResolverBuilder builder)Override to configure how the requested content type is resolved.protected voidconfigureHttpMessageCodecs(ServerCodecConfigurer configurer)Override to configure the HTTP message readers and writers to use.voidconfigurePathMatching(PathMatchConfigurer configurer)Override to configure path matching options.protected voidconfigureViewResolvers(ViewResolverRegistry registry)Configure view resolution for supporting template engines.protected MessageCodesResolvergetMessageCodesResolver()Override this method to provide a customMessageCodesResolver.protected ValidatorgetValidator()Override this method to provide a customValidator.voidsetConfigurers(List<WebFluxConfigurer> configurers)Methods inherited from class org.springframework.web.reactive.config.WebFluxConfigurationSupport
createLocaleContextResolver, createRequestMappingHandlerAdapter, createRequestMappingHandlerMapping, createRouterFunctionMapping, getApplicationContext, getConfigurableWebBindingInitializer, getCorsConfigurations, getPathMatchConfigurer, getViewResolverRegistry, handlerFunctionAdapter, localeContextResolver, requestMappingHandlerAdapter, requestMappingHandlerMapping, resourceHandlerMapping, resourceUrlProvider, responseBodyResultHandler, responseEntityResultHandler, responseStatusExceptionHandler, routerFunctionMapping, serverCodecConfigurer, serverResponseResultHandler, setApplicationContext, simpleHandlerAdapter, viewResolutionResultHandler, webFluxAdapterRegistry, webFluxContentTypeResolver, webFluxConversionService, webFluxValidator, webHandler
Constructor Detail
DelegatingWebFluxConfiguration
public DelegatingWebFluxConfiguration()
Method Detail
setConfigurers
@Autowired(required=false) public void setConfigurers(List<WebFluxConfigurer> configurers)
configureContentTypeResolver
protected void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
Description copied from class:WebFluxConfigurationSupportOverride to configure how the requested content type is resolved.- Overrides:
configureContentTypeResolverin classWebFluxConfigurationSupport
addCorsMappings
protected void addCorsMappings(CorsRegistry registry)
Description copied from class:WebFluxConfigurationSupportOverride this method to configure cross origin requests processing.- Overrides:
addCorsMappingsin classWebFluxConfigurationSupport- See Also:
CorsRegistry
configurePathMatching
public void configurePathMatching(PathMatchConfigurer configurer)
Description copied from class:WebFluxConfigurationSupportOverride to configure path matching options.- Overrides:
configurePathMatchingin classWebFluxConfigurationSupport
addResourceHandlers
protected void addResourceHandlers(ResourceHandlerRegistry registry)
Description copied from class:WebFluxConfigurationSupportOverride this method to add resource handlers for serving static resources.- Overrides:
addResourceHandlersin classWebFluxConfigurationSupport- See Also:
ResourceHandlerRegistry
configureArgumentResolvers
protected void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
Description copied from class:WebFluxConfigurationSupportConfigure resolvers for custom controller method arguments.- Overrides:
configureArgumentResolversin classWebFluxConfigurationSupport
configureHttpMessageCodecs
protected void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
Description copied from class:WebFluxConfigurationSupportOverride to configure the HTTP message readers and writers to use.- Overrides:
configureHttpMessageCodecsin classWebFluxConfigurationSupport
addFormatters
protected void addFormatters(FormatterRegistry registry)
Description copied from class:WebFluxConfigurationSupportOverride this method to add customConverterand/orFormatterdelegates to the commonFormattingConversionService.- Overrides:
addFormattersin classWebFluxConfigurationSupport- See Also:
WebFluxConfigurationSupport.webFluxConversionService()
getValidator
protected Validator getValidator()
Description copied from class:WebFluxConfigurationSupportOverride this method to provide a customValidator.- Overrides:
getValidatorin classWebFluxConfigurationSupport
getMessageCodesResolver
protected MessageCodesResolver getMessageCodesResolver()
Description copied from class:WebFluxConfigurationSupportOverride this method to provide a customMessageCodesResolver.- Overrides:
getMessageCodesResolverin classWebFluxConfigurationSupport
configureViewResolvers
protected void configureViewResolvers(ViewResolverRegistry registry)
Description copied from class:WebFluxConfigurationSupportConfigure view resolution for supporting template engines.- Overrides:
configureViewResolversin classWebFluxConfigurationSupport- See Also:
ViewResolverRegistry