public interface WebFluxConfigurer
@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.
Modifier and Type | Method and Description |
---|---|
default void |
addCorsMappings(CorsRegistry registry)
Configure cross origin requests processing.
|
default void |
addFormatters(FormatterRegistry registry)
|
default void |
addResourceHandlers(ResourceHandlerRegistry registry)
Add resource handlers for serving static resources.
|
default void |
configureArgumentResolvers(ArgumentResolverConfigurer configurer)
Configure resolvers for custom controller method arguments.
|
default void |
configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
Configure how the content type requested for the response is resolved.
|
default void |
configureHttpMessageCodecs(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 processing the return values of controller
methods that rely on resolving a
View to render
the response with. |
default MessageCodesResolver |
getMessageCodesResolver()
Provide a custom
MessageCodesResolver to use for data binding instead
of the one created by default in DataBinder . |
default Validator |
getValidator()
Provide a custom
Validator . |
default void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
builder
- for configuring the resolvers to usedefault void addCorsMappings(CorsRegistry registry)
CorsRegistry
default void configurePathMatching(PathMatchConfigurer configurer)
HandlerMapping
s with path matching options.configurer
- the PathMatchConfigurer
instancedefault void addResourceHandlers(ResourceHandlerRegistry registry)
ResourceHandlerRegistry
default void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
configurer
- to configurer to usedefault void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
configurer
- the configurer to usedefault void addFormatters(FormatterRegistry registry)
@Nullable default Validator getValidator()
Validator
.
By default a validator for standard bean validation is created if bean validation api is present on the classpath.
@Nullable default MessageCodesResolver getMessageCodesResolver()
MessageCodesResolver
to use for data binding instead
of the one created by default in DataBinder
.default void configureViewResolvers(ViewResolverRegistry registry)
View
to render
the response with. By default all controller methods rely on view
resolution unless annotated with @ResponseBody
or explicitly
return ResponseEntity
. A view may be specified explicitly with
a String return value or implicitly, e.g. void
return value.ViewResolverRegistry