org.springframework.web.reactive.config

## Class WebFluxConfigurerComposite

- java.lang.Object
- - org.springframework.web.reactive.config.WebFluxConfigurerComposite

- All Implemented Interfaces:
    WebFluxConfigurer

      public class WebFluxConfigurerComposite
      extends Object
      implements WebFluxConfigurer

  A `WebFluxConfigurer` that delegates to one or more others.
  Since:
    5.0
  Author:
    Brian Clozel, Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebFluxConfigurerComposite()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCorsMappings(CorsRegistry registry)` Configure "global" cross-origin request processing.
    `void` | `addFormatters(FormatterRegistry registry)` Add custom `Converters` and `Formatters` 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 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.
    `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`.
    `Validator` | `getValidator()` Provide a custom `Validator`.
    `WebSocketService` | `getWebSocketService()` Provide the `WebSocketService` to create `WebSocketHandlerAdapter` with.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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 interface `WebFluxConfigurer`
      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 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 is `combined` with local CORS configuration defined on a controller method.

      Specified by:
        `addCorsMappings` in interface `WebFluxConfigurer`
      See Also:
        `CorsRegistry`, `CorsConfiguration.combine(CorsConfiguration)`

    - #### 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 interface `WebFluxConfigurer`
      Parameters:
        `configurer` - the `PathMatchConfigurer` instance

    - #### addResourceHandlers

          public void addResourceHandlers(ResourceHandlerRegistry registry)

      Description copied from interface: `WebFluxConfigurer`
      Add resource handlers for serving static resources.
      Specified by:
        `addResourceHandlers` in interface `WebFluxConfigurer`
      See Also:
        `ResourceHandlerRegistry`

    - #### getWebSocketService

          @Nullable
          public WebSocketService getWebSocketService()

      Description copied from interface: `WebFluxConfigurer`
      Provide the `WebSocketService` to create `WebSocketHandlerAdapter` with. This can be used to configure server-specific properties through the `RequestUpgradeStrategy`.
      Specified by:
        `getWebSocketService` in interface `WebFluxConfigurer`

    - #### configureArgumentResolvers

          public void configureArgumentResolvers(ArgumentResolverConfigurer configurer)

      Description copied from interface: `WebFluxConfigurer`
      Configure resolvers for custom `@RequestMapping` method arguments.
      Specified by:
        `configureArgumentResolvers` in interface `WebFluxConfigurer`
      Parameters:
        `configurer` - to configurer to use

    - #### configureHttpMessageCodecs

          public void configureHttpMessageCodecs(ServerCodecConfigurer configurer)

      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 interface `WebFluxConfigurer`
      Parameters:
        `configurer` - the configurer to customize readers and writers

    - #### addFormatters

          public void addFormatters(FormatterRegistry registry)

      Description copied from interface: `WebFluxConfigurer`
      Add custom `Converters` and `Formatters` for performing type conversion and formatting of annotated controller method arguments.
      Specified by:
        `addFormatters` in interface `WebFluxConfigurer`

    - #### getValidator

          public Validator getValidator()

      Description copied from interface: `WebFluxConfigurer`
      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.

      Specified by:
        `getValidator` in interface `WebFluxConfigurer`

    - #### getMessageCodesResolver

          public MessageCodesResolver getMessageCodesResolver()

      Description copied from interface: `WebFluxConfigurer`
      Provide a custom `MessageCodesResolver` to use for data binding in annotated controller method arguments instead of the one created by default in `DataBinder`.
      Specified by:
        `getMessageCodesResolver` in interface `WebFluxConfigurer`

    - #### 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 interface `WebFluxConfigurer`