Class WebFluxConfigurerComposite
- java.lang.Object
- org.springframework.web.reactive.config.WebFluxConfigurerComposite
- All Implemented Interfaces:
WebFluxConfigurer
public class WebFluxConfigurerComposite extends Object implements WebFluxConfigurer
AWebFluxConfigurer
that 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 void
addCorsMappings(CorsRegistry registry)
Configure "global" cross origin request processing.void
addFormatters(FormatterRegistry registry)
Add customConverters
andFormatters
for performing type conversion and formatting of annotated controller method arguments.void
addResourceHandlers(ResourceHandlerRegistry registry)
Add resource handlers for serving static resources.void
addWebFluxConfigurers(List<WebFluxConfigurer> configurers)
void
configureArgumentResolvers(ArgumentResolverConfigurer configurer)
Configure resolvers for custom@RequestMapping
method arguments.void
configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
Configure how the content type requested for the response is resolved when handling requests with annotated controllers.void
configureHttpMessageCodecs(ServerCodecConfigurer configurer)
Configure custom HTTP message readers and writers or override built-in ones.void
configurePathMatching(PathMatchConfigurer configurer)
Configure path matching options.void
configureViewResolvers(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.MessageCodesResolver
getMessageCodesResolver()
Provide a customMessageCodesResolver
to use for data binding in annotated controller method arguments instead of the one created by default inDataBinder
.Validator
getValidator()
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:WebFluxConfigurer
Configure how the content type requested for the response is resolved when handling requests with annotated controllers.- Specified by:
configureContentTypeResolver
in interfaceWebFluxConfigurer
- Parameters:
builder
- for configuring the resolvers to use
addCorsMappings
public void addCorsMappings(CorsRegistry registry)
Description copied from interface:WebFluxConfigurer
Configure "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:
addCorsMappings
in interfaceWebFluxConfigurer
- See Also:
CorsRegistry
configurePathMatching
public void configurePathMatching(PathMatchConfigurer configurer)
Description copied from interface:WebFluxConfigurer
Configure path matching options.The configured path matching options will be used for mapping to annotated controllers and also
static resources
.- Specified by:
configurePathMatching
in interfaceWebFluxConfigurer
- Parameters:
configurer
- thePathMatchConfigurer
instance
addResourceHandlers
public void addResourceHandlers(ResourceHandlerRegistry registry)
Description copied from interface:WebFluxConfigurer
Add resource handlers for serving static resources.- Specified by:
addResourceHandlers
in interfaceWebFluxConfigurer
- See Also:
ResourceHandlerRegistry
configureArgumentResolvers
public void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
Description copied from interface:WebFluxConfigurer
Configure resolvers for custom@RequestMapping
method arguments.- Specified by:
configureArgumentResolvers
in interfaceWebFluxConfigurer
- Parameters:
configurer
- to configurer to use
configureHttpMessageCodecs
public void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
Description copied from interface:WebFluxConfigurer
Configure 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:
configureHttpMessageCodecs
in interfaceWebFluxConfigurer
- Parameters:
configurer
- the configurer to use
addFormatters
public void addFormatters(FormatterRegistry registry)
Description copied from interface:WebFluxConfigurer
Add customConverters
andFormatters
for performing type conversion and formatting of annotated controller method arguments.- Specified by:
addFormatters
in interfaceWebFluxConfigurer
getValidator
public Validator getValidator()
Description copied from interface:WebFluxConfigurer
Provide 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:
getValidator
in interfaceWebFluxConfigurer
getMessageCodesResolver
public MessageCodesResolver getMessageCodesResolver()
Description copied from interface:WebFluxConfigurer
Provide a customMessageCodesResolver
to use for data binding in annotated controller method arguments instead of the one created by default inDataBinder
.- Specified by:
getMessageCodesResolver
in interfaceWebFluxConfigurer
configureViewResolvers
public void configureViewResolvers(ViewResolverRegistry registry)
Description copied from interface:WebFluxConfigurer
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. JSON, XML).The configured view resolvers will be used for both annotated controllers and functional endpoints.
- Specified by:
configureViewResolvers
in interfaceWebFluxConfigurer