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.- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Brian Clozel, Sam Brannen, MichaĆ Rowicki
-
Method Summary
Modifier and TypeMethodDescriptionapiVersioning(Consumer<ApiVersionConfigurer> configurer) Configure API versioning for mapping requests to controller methods.argumentResolvers(Consumer<ArgumentResolverConfigurer> configurer) Configure resolvers for custom controller method arguments.blockingExecution(Consumer<BlockingExecutionConfigurer> consumer) Configure blocking execution options.Customize content type resolution.controllerAdvice(Object... controllerAdvice) Register one or moreControllerAdviceinstances to be used in tests (specifiedClasswill 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 WebTestClient.MockServerSpec
apply, build, configureClient, sslInfo, webFilter, webSessionManager
-
Method Details
-
controllerAdvice
Register one or moreControllerAdviceinstances to be used in tests (specifiedClasswill be turned into instance). -
contentTypeResolver
WebTestClient.ControllerSpec contentTypeResolver(Consumer<RequestedContentTypeResolverBuilder> consumer) Customize content type resolution.- See Also:
-
corsMappings
Configure CORS support.- See Also:
-
pathMatching
Configure path matching options.- See Also:
-
argumentResolvers
Configure resolvers for custom controller method arguments.- See Also:
-
httpMessageCodecs
Configure custom HTTP message readers and writers or override built-in ones.- See Also:
-
formatters
Register formatters and converters to use for type conversion.- See Also:
-
validator
-
apiVersioning
Configure API versioning for mapping requests to controller methods.- Since:
- 7.0
-
viewResolvers
Configure view resolution.- See Also:
-
blockingExecution
Configure blocking execution options.- Since:
- 6.1
- See Also:
-