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 Details

    • WebFluxConfigurerComposite

      public WebFluxConfigurerComposite()
  • Method Details

    • 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:
    • 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:
    • 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(org.springframework.http.codec.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(org.springframework.format.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 org.springframework.validation.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 org.springframework.validation.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