org.springframework.web.reactive.config

## Interface WebFluxConfigurer

All Known Implementing Classes:
  WebFluxConfigurerComposite

    public interface WebFluxConfigurer

Defines callback methods to customize the configuration for WebFlux applications enabled via `@EnableWebFlux`.

`@EnableWebFlux`-annotated configuration classes may implement this interface to be called back and given a chance to customize the default configuration. Consider implementing this interface and overriding the relevant methods for your needs.

Since:
  5.0
Author:
  Brian Clozel, Rossen Stoyanchev
See Also:
  `WebFluxConfigurationSupport`, `DelegatingWebFluxConfiguration`

### Method Summary

All Methods Instance Methods Default Methods
`default void` `addCorsMappings(CorsRegistry registry)` Configure "global" cross origin request processing.
`default void` `addFormatters(org.springframework.format.FormatterRegistry registry)` Add custom `Converters` and `Formatters` for performing type conversion and formatting of annotated controller method arguments.
`default void` `addResourceHandlers(ResourceHandlerRegistry registry)` Add resource handlers for serving static resources.
`default void` `configureArgumentResolvers(ArgumentResolverConfigurer configurer)` Configure resolvers for custom `@RequestMapping` method arguments.
`default void` `configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)` Configure how the content type requested for the response is resolved when handling requests with annotated controllers.
`default void` `configureHttpMessageCodecs(org.springframework.http.codec.ServerCodecConfigurer configurer)` Configure custom HTTP message readers and writers or override built-in ones.
`default void` `configurePathMatching(PathMatchConfigurer configurer)` Configure path matching options.
`default 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.
`default org.springframework.validation.MessageCodesResolver` `getMessageCodesResolver()` Provide a custom `MessageCodesResolver` to use for data binding in annotated controller method arguments instead of the one created by default in `DataBinder`.
`default org.springframework.validation.Validator` `getValidator()` Provide a custom `Validator`.

### Method Detail

#### configureContentTypeResolver

    default void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)

Configure how the content type requested for the response is resolved when handling requests with annotated controllers.

Parameters:
  `builder` - for configuring the resolvers to use

#### addCorsMappings

    default void addCorsMappings(CorsRegistry registry)

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`.

See Also:
  `CorsRegistry`

#### configurePathMatching

    default void configurePathMatching(PathMatchConfigurer configurer)

Configure path matching options.

The configured path matching options will be used for mapping to annotated controllers and also `static resources`.

Parameters:
  `configurer` - the `PathMatchConfigurer` instance

#### addResourceHandlers

    default void addResourceHandlers(ResourceHandlerRegistry registry)

Add resource handlers for serving static resources.

See Also:
  `ResourceHandlerRegistry`

#### configureArgumentResolvers

    default void configureArgumentResolvers(ArgumentResolverConfigurer configurer)

Configure resolvers for custom `@RequestMapping` method arguments.

Parameters:
  `configurer` - to configurer to use

#### configureHttpMessageCodecs

    default void configureHttpMessageCodecs(org.springframework.http.codec.ServerCodecConfigurer configurer)

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.

Parameters:
  `configurer` - the configurer to use

#### addFormatters

    default void addFormatters(org.springframework.format.FormatterRegistry registry)

Add custom `Converters` and `Formatters` for performing type conversion and formatting of annotated controller method arguments.

#### getValidator

    @Nullable
    default org.springframework.validation.Validator getValidator()

Provide a custom `Validator`.

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.

#### getMessageCodesResolver

    @Nullable
    default org.springframework.validation.MessageCodesResolver getMessageCodesResolver()

Provide a custom `MessageCodesResolver` to use for data binding in annotated controller method arguments instead of the one created by default in `DataBinder`.

#### configureViewResolvers

    default 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. JSON, XML).

The configured view resolvers will be used for both annotated controllers and functional endpoints.