Class WebFluxConfigurerComposite
- java.lang.Object
- org.springframework.web.reactive.config.WebFluxConfigurerComposite
- All Implemented Interfaces:
WebFluxConfigurer
public class WebFluxConfigurerComposite extends Object implements WebFluxConfigurer
AWebFluxConfigurerthat delegates to one or more others.- Since:
- 5.0
- Author:
- Brian Clozel, Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description WebFluxConfigurerComposite()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCorsMappings(CorsRegistry registry)Configure "global" cross origin request processing.voidaddFormatters(FormatterRegistry registry)Add customConvertersandFormattersfor performing type conversion and formatting of annotated controller method arguments.voidaddResourceHandlers(ResourceHandlerRegistry registry)Add resource handlers for serving static resources.voidaddWebFluxConfigurers(List<WebFluxConfigurer> configurers)voidconfigureArgumentResolvers(ArgumentResolverConfigurer configurer)Configure resolvers for custom@RequestMappingmethod arguments.voidconfigureContentTypeResolver(RequestedContentTypeResolverBuilder builder)Configure how the content type requested for the response is resolved when handling requests with annotated controllers.voidconfigureHttpMessageCodecs(ServerCodecConfigurer configurer)Configure custom HTTP message readers and writers or override built-in ones.voidconfigurePathMatching(PathMatchConfigurer configurer)Configure path matching options.voidconfigureViewResolvers(ViewResolverRegistry registry)Configure view resolution for rendering responses with a view and a model, where the view is typically an HTML template but could also be based on an HTTP message writer (e.g.MessageCodesResolvergetMessageCodesResolver()Provide a customMessageCodesResolverto use for data binding in annotated controller method arguments instead of the one created by default inDataBinder.ValidatorgetValidator()Provide a customValidator.
Constructor Detail
WebFluxConfigurerComposite
public WebFluxConfigurerComposite()
Method Detail
addWebFluxConfigurers
public void addWebFluxConfigurers(List<WebFluxConfigurer> configurers)
configureContentTypeResolver
public void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
Description copied from interface:WebFluxConfigurerConfigure how the content type requested for the response is resolved when handling requests with annotated controllers.- Specified by:
configureContentTypeResolverin interfaceWebFluxConfigurer- Parameters:
builder- for configuring the resolvers to use
addCorsMappings
public void addCorsMappings(CorsRegistry registry)
Description copied from interface:WebFluxConfigurerConfigure "global" cross origin request processing.The configured readers and writers will apply to all requests including annotated controllers and functional endpoints. Annotated controllers can further declare more fine-grained configuration via
@CrossOrigin.- Specified by:
addCorsMappingsin interfaceWebFluxConfigurer- See Also:
CorsRegistry
configurePathMatching
public void configurePathMatching(PathMatchConfigurer configurer)
Description copied from interface:WebFluxConfigurerConfigure path matching options.The configured path matching options will be used for mapping to annotated controllers and also
static resources.- Specified by:
configurePathMatchingin interfaceWebFluxConfigurer- Parameters:
configurer- thePathMatchConfigurerinstance
addResourceHandlers
public void addResourceHandlers(ResourceHandlerRegistry registry)
Description copied from interface:WebFluxConfigurerAdd resource handlers for serving static resources.- Specified by:
addResourceHandlersin interfaceWebFluxConfigurer- See Also:
ResourceHandlerRegistry
configureArgumentResolvers
public void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
Description copied from interface:WebFluxConfigurerConfigure resolvers for custom@RequestMappingmethod arguments.- Specified by:
configureArgumentResolversin interfaceWebFluxConfigurer- Parameters:
configurer- to configurer to use
configureHttpMessageCodecs
public void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
Description copied from interface:WebFluxConfigurerConfigure custom HTTP message readers and writers or override built-in ones.The configured readers and writers will be used for both annotated controllers and functional endpoints.
- Specified by:
configureHttpMessageCodecsin interfaceWebFluxConfigurer- Parameters:
configurer- the configurer to use
addFormatters
public void addFormatters(FormatterRegistry registry)
Description copied from interface:WebFluxConfigurerAdd customConvertersandFormattersfor performing type conversion and formatting of annotated controller method arguments.- Specified by:
addFormattersin interfaceWebFluxConfigurer
getValidator
public Validator getValidator()
Description copied from interface:WebFluxConfigurerProvide a customValidator.By default a validator for standard bean validation is created if bean validation API is present on the classpath.
The configured validator is used for validating annotated controller method arguments.
- Specified by:
getValidatorin interfaceWebFluxConfigurer
getMessageCodesResolver
public MessageCodesResolver getMessageCodesResolver()
Description copied from interface:WebFluxConfigurerProvide a customMessageCodesResolverto use for data binding in annotated controller method arguments instead of the one created by default inDataBinder.- Specified by:
getMessageCodesResolverin interfaceWebFluxConfigurer
configureViewResolvers
public void configureViewResolvers(ViewResolverRegistry registry)
Description copied from interface:WebFluxConfigurerConfigure view resolution for rendering responses with a view and a model, where the view is typically an HTML template but could also be based on an HTTP message writer (e.g. JSON, XML).The configured view resolvers will be used for both annotated controllers and functional endpoints.
- Specified by:
configureViewResolversin interfaceWebFluxConfigurer