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.voidaddErrorResponseInterceptors(List<ErrorResponse.Interceptor> interceptors) Add to the list ofErrorResponse.Interceptor's to invoke when rendering an RFC 9457ProblemDetailerror response.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) voidconfigureApiVersioning(ApiVersionConfigurer configurer) Configure API versioning for the application.voidconfigureArgumentResolvers(ArgumentResolverConfigurer configurer) Configure resolvers for custom@RequestMappingmethod arguments.voidConfigure settings related to blocking execution in WebFlux.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 (for example, JSON, XML).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
-
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
-
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:
-
configureBlockingExecution
Description copied from interface:WebFluxConfigurerConfigure settings related to blocking execution in WebFlux.- Specified by:
configureBlockingExecutionin interfaceWebFluxConfigurer
-
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
-
configureApiVersioning
Description copied from interface:WebFluxConfigurerConfigure API versioning for the application. In order for versioning to be enabled, you must configure at least one way to resolve the API version from a request (e.g. via request header).- Specified by:
configureApiVersioningin interfaceWebFluxConfigurer
-
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
-
configureArgumentResolvers
Description copied from interface:WebFluxConfigurerConfigure resolvers for custom@RequestMappingmethod arguments.- Specified by:
configureArgumentResolversin interfaceWebFluxConfigurer- Parameters:
configurer- to configurer to use
-
addErrorResponseInterceptors
Description copied from interface:WebFluxConfigurerAdd to the list ofErrorResponse.Interceptor's to invoke when rendering an RFC 9457ProblemDetailerror response.- Specified by:
addErrorResponseInterceptorsin interfaceWebFluxConfigurer- Parameters:
interceptors- the handlers to use
-
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 (for example, JSON, XML).The configured view resolvers will be used for both annotated controllers and functional endpoints.
- Specified by:
configureViewResolversin interfaceWebFluxConfigurer
-
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
-