private class DefaultControllerSpec.TestWebFluxConfigurer extends java.lang.Object implements WebFluxConfigurer
Modifier and Type | Field and Description |
---|---|
private java.util.function.Consumer<ArgumentResolverConfigurer> |
argumentResolverConsumer |
private java.util.function.Consumer<RequestedContentTypeResolverBuilder> |
contentTypeResolverConsumer |
private java.util.function.Consumer<CorsRegistry> |
corsRegistryConsumer |
private java.util.function.Consumer<FormatterRegistry> |
formattersConsumer |
private java.util.function.Consumer<ServerCodecConfigurer> |
messageCodecsConsumer |
private java.util.function.Consumer<PathMatchConfigurer> |
pathMatchConsumer |
private Validator |
validator |
private java.util.function.Consumer<ViewResolverRegistry> |
viewResolversConsumer |
Modifier | Constructor and Description |
---|---|
private |
TestWebFluxConfigurer() |
Modifier and Type | Method and Description |
---|---|
void |
addCorsMappings(CorsRegistry registry)
Configure "global" cross origin request processing.
|
void |
addFormatters(FormatterRegistry registry)
|
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 reqests with annotated controllers.
|
void |
configureHttpMessageCodecs(ServerCodecConfigurer configurer)
Configure custom HTTP message readers and writers or override built-in ones.
|
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.
|
Validator |
getValidator()
Provide a custom
Validator . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addResourceHandlers, getMessageCodesResolver
@Nullable private java.util.function.Consumer<RequestedContentTypeResolverBuilder> contentTypeResolverConsumer
@Nullable private java.util.function.Consumer<CorsRegistry> corsRegistryConsumer
@Nullable private java.util.function.Consumer<ArgumentResolverConfigurer> argumentResolverConsumer
@Nullable private java.util.function.Consumer<PathMatchConfigurer> pathMatchConsumer
@Nullable private java.util.function.Consumer<ServerCodecConfigurer> messageCodecsConsumer
@Nullable private java.util.function.Consumer<FormatterRegistry> formattersConsumer
@Nullable private java.util.function.Consumer<ViewResolverRegistry> viewResolversConsumer
public void configureContentTypeResolver(RequestedContentTypeResolverBuilder builder)
WebFluxConfigurer
configureContentTypeResolver
in interface WebFluxConfigurer
builder
- for configuring the resolvers to usepublic void addCorsMappings(CorsRegistry registry)
WebFluxConfigurer
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
.
addCorsMappings
in interface WebFluxConfigurer
CorsRegistry
public void configurePathMatching(PathMatchConfigurer configurer)
WebFluxConfigurer
The configured path matching options will be used for mapping to
annotated controllers and also
static resources
.
configurePathMatching
in interface WebFluxConfigurer
configurer
- the PathMatchConfigurer
instancepublic void configureArgumentResolvers(ArgumentResolverConfigurer configurer)
WebFluxConfigurer
@RequestMapping
method arguments.configureArgumentResolvers
in interface WebFluxConfigurer
configurer
- to configurer to usepublic void configureHttpMessageCodecs(ServerCodecConfigurer configurer)
WebFluxConfigurer
The configured readers and writers will be used for both annotated controllers and functional endpoints.
configureHttpMessageCodecs
in interface WebFluxConfigurer
configurer
- the configurer to usepublic void addFormatters(FormatterRegistry registry)
WebFluxConfigurer
Converter
s and Formatter
s for performing type
conversion and formatting of annotated controller method arguments.addFormatters
in interface WebFluxConfigurer
@Nullable public Validator getValidator()
WebFluxConfigurer
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.
getValidator
in interface WebFluxConfigurer
public void configureViewResolvers(ViewResolverRegistry registry)
WebFluxConfigurer
The configured view resolvers will be used for both annotated controllers and functional endpoints.
configureViewResolvers
in interface WebFluxConfigurer