Class WebFluxConfigurerComposite
- All Implemented Interfaces:
WebFluxConfigurer
WebFluxConfigurer
that delegates to one or more others.- Since:
- 5.0
- Author:
- Brian Clozel, Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCorsMappings
(CorsRegistry registry) Configure "global" cross-origin request processing.void
addErrorResponseInterceptors
(List<ErrorResponse.Interceptor> interceptors) Add to the list ofErrorResponse.Interceptor
's to invoke when rendering an RFC 7807ProblemDetail
error response.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
Configure settings related to blocking execution in WebFlux.void
Configure how the content type requested for the response is resolved when handling requests with annotated controllers.void
configureHttpMessageCodecs
(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.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.Provide a customMessageCodesResolver
to use for data binding in annotated controller method arguments instead of the one created by default inDataBinder
.Provide a customValidator
.Provide theWebSocketService
to createWebSocketHandlerAdapter
with.
-
Constructor Details
-
WebFluxConfigurerComposite
public WebFluxConfigurerComposite()
-
-
Method Details
-
addWebFluxConfigurers
-
configureHttpMessageCodecs
Description copied from interface:WebFluxConfigurer
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.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:
configureHttpMessageCodecs
in interfaceWebFluxConfigurer
- Parameters:
configurer
- the configurer to customize readers and writers
-
addFormatters
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
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
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
-
addCorsMappings
Description copied from interface:WebFluxConfigurer
Configure "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 iscombined
with local CORS configuration defined on a controller method.- Specified by:
addCorsMappings
in interfaceWebFluxConfigurer
- See Also:
-
configureBlockingExecution
Description copied from interface:WebFluxConfigurer
Configure settings related to blocking execution in WebFlux.- Specified by:
configureBlockingExecution
in interfaceWebFluxConfigurer
-
configureContentTypeResolver
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
-
configurePathMatching
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
-
configureArgumentResolvers
Description copied from interface:WebFluxConfigurer
Configure resolvers for custom@RequestMapping
method arguments.- Specified by:
configureArgumentResolvers
in interfaceWebFluxConfigurer
- Parameters:
configurer
- to configurer to use
-
addErrorResponseInterceptors
Description copied from interface:WebFluxConfigurer
Add to the list ofErrorResponse.Interceptor
's to invoke when rendering an RFC 7807ProblemDetail
error response.- Specified by:
addErrorResponseInterceptors
in interfaceWebFluxConfigurer
- Parameters:
interceptors
- the handlers to use
-
configureViewResolvers
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
-
addResourceHandlers
Description copied from interface:WebFluxConfigurer
Add resource handlers for serving static resources.- Specified by:
addResourceHandlers
in interfaceWebFluxConfigurer
- See Also:
-
getWebSocketService
Description copied from interface:WebFluxConfigurer
Provide theWebSocketService
to createWebSocketHandlerAdapter
with. This can be used to configure server-specific properties through theRequestUpgradeStrategy
.- Specified by:
getWebSocketService
in interfaceWebFluxConfigurer
-