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 SummaryModifier 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 org.springframework.test.web.reactive.server.WebTestClient.MockServerSpecapply, build, configureClient, sslInfo, webFilter, webSessionManager
- 
Method Details- 
controllerAdviceRegister one or moreControllerAdviceinstances to be used in tests (specifiedClasswill be turned into instance).
- 
contentTypeResolverWebTestClient.ControllerSpec contentTypeResolver(Consumer<RequestedContentTypeResolverBuilder> consumer) Customize content type resolution.- See Also:
 
- 
corsMappingsConfigure CORS support.- See Also:
 
- 
pathMatchingConfigure path matching options.- See Also:
 
- 
argumentResolversConfigure resolvers for custom controller method arguments.- See Also:
 
- 
httpMessageCodecsConfigure custom HTTP message readers and writers or override built-in ones.- See Also:
 
- 
formattersRegister formatters and converters to use for type conversion.- See Also:
 
- 
validator
- 
apiVersioningConfigure API versioning for mapping requests to controller methods.- Since:
- 7.0
 
- 
viewResolversConfigure view resolution.- See Also:
 
- 
blockingExecutionConfigure blocking execution options.- Since:
- 6.1
- See Also:
 
 
-