Interface WebTestClient.ControllerSpec
- All Superinterfaces:
WebTestClient.MockServerSpec<WebTestClient.ControllerSpec>
- Enclosing interface:
- WebTestClient
public static interface WebTestClient.ControllerSpec
extends WebTestClient.MockServerSpec<WebTestClient.ControllerSpec>
Specification for customizing controller configuration equivalent to, and
internally delegating to, a
WebFluxConfigurer
.-
Method Summary
Modifier and TypeMethodDescriptionargumentResolvers
(Consumer<ArgumentResolverConfigurer> configurer) Configure resolvers for custom controller method arguments.Customize content type resolution.controllerAdvice
(Object... controllerAdvice) Register one or moreControllerAdvice
instances to be used in tests (specifiedClass
will be turned into instance).corsMappings
(Consumer<CorsRegistry> consumer) Configure CORS support.formatters
(Consumer<FormatterRegistry> consumer) Register formatters and converters to use for type conversion.httpMessageCodecs
(Consumer<ServerCodecConfigurer> configurer) Configure custom HTTP message readers and writers or override built-in ones.pathMatching
(Consumer<PathMatchConfigurer> consumer) Configure path matching options.Configure a global Validator.viewResolvers
(Consumer<ViewResolverRegistry> consumer) Configure view resolution.Methods inherited from interface org.springframework.test.web.reactive.server.WebTestClient.MockServerSpec
apply, build, configureClient, webFilter, webSessionManager
-
Method Details
-
controllerAdvice
Register one or moreControllerAdvice
instances to be used in tests (specifiedClass
will be turned into instance). -
contentTypeResolver
WebTestClient.ControllerSpec contentTypeResolver(Consumer<RequestedContentTypeResolverBuilder> consumer) Customize content type resolution. -
corsMappings
Configure CORS support. -
pathMatching
Configure path matching options. -
argumentResolvers
Configure resolvers for custom controller method arguments. -
httpMessageCodecs
Configure custom HTTP message readers and writers or override built-in ones. -
formatters
Register formatters and converters to use for type conversion. -
validator
Configure a global Validator.- See Also:
-
viewResolvers
Configure view resolution.
-