Class WebFluxConfigurerComposite
- All Implemented Interfaces:
WebFluxConfigurer
WebFluxConfigurer that delegates to one or more others.- Since:
- 5.0
- Author:
- Brian Clozel, Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCorsMappings(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.voidConfigure how the content type requested for the response is resolved when handling requests with annotated controllers.voidconfigureHttpMessageCodecs(ServerCodecConfigurer configurer) Configure the HTTP message readers and writers for reading from the request body and for writing to the response body in annotated controllers and functional endpoints.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.Provide a customMessageCodesResolverto use for data binding in annotated controller method arguments instead of the one created by default inDataBinder.Provide a customValidator.Provide theWebSocketServiceto createWebSocketHandlerAdapterwith.
-
Constructor Details
-
WebFluxConfigurerComposite
public WebFluxConfigurerComposite()
-
-
Method Details
-
addWebFluxConfigurers
-
configureContentTypeResolver
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
Description copied from interface:WebFluxConfigurerConfigure "global" cross-origin request processing. The configured CORS mappings apply to annotated controllers, functional endpoints, and static resources.Annotated controllers can further declare more fine-grained config via
@CrossOrigin. In such cases "global" CORS configuration declared here iscombinedwith local CORS configuration defined on a controller method.- Specified by:
addCorsMappingsin interfaceWebFluxConfigurer- See Also:
-
configurePathMatching
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
Description copied from interface:WebFluxConfigurerAdd resource handlers for serving static resources.- Specified by:
addResourceHandlersin interfaceWebFluxConfigurer- See Also:
-
getWebSocketService
Description copied from interface:WebFluxConfigurerProvide theWebSocketServiceto createWebSocketHandlerAdapterwith. This can be used to configure server-specific properties through theRequestUpgradeStrategy.- Specified by:
getWebSocketServicein interfaceWebFluxConfigurer
-
configureArgumentResolvers
Description copied from interface:WebFluxConfigurerConfigure resolvers for custom@RequestMappingmethod arguments.- Specified by:
configureArgumentResolversin interfaceWebFluxConfigurer- Parameters:
configurer- to configurer to use
-
configureHttpMessageCodecs
Description copied from interface:WebFluxConfigurerConfigure the HTTP message readers and writers for reading from the request body and for writing to the response body in annotated controllers and functional endpoints.By default, all built-in readers and writers are configured as long as the corresponding 3rd party libraries such Jackson JSON, JAXB2, and others are present on the classpath.
- Specified by:
configureHttpMessageCodecsin interfaceWebFluxConfigurer- Parameters:
configurer- the configurer to customize readers and writers
-
addFormatters
Description copied from interface:WebFluxConfigurerAdd customConvertersandFormattersfor performing type conversion and formatting of annotated controller method arguments.- Specified by:
addFormattersin interfaceWebFluxConfigurer
-
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
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
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
-