接口 WebTestClient.ControllerSpec
- 封闭接口:
- WebTestClient
public static interface WebTestClient.ControllerSpec extends WebTestClient.MockServerSpec<WebTestClient.ControllerSpec>
Specification for customizing controller configuration equivalent to, and internally delegating to, aWebFluxConfigurer
.
方法概要
从接口继承的方法 org.springframework.test.web.reactive.server.WebTestClient.MockServerSpec
apply, build, configureClient, webFilter, webSessionManager
方法详细资料
controllerAdvice
WebTestClient.ControllerSpec controllerAdvice(Object... 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
WebTestClient.ControllerSpec corsMappings(Consumer<CorsRegistry> consumer)
Configure CORS support.
pathMatching
WebTestClient.ControllerSpec pathMatching(Consumer<PathMatchConfigurer> consumer)
Configure path matching options.
argumentResolvers
WebTestClient.ControllerSpec argumentResolvers(Consumer<ArgumentResolverConfigurer> configurer)
Configure resolvers for custom controller method arguments.
httpMessageCodecs
WebTestClient.ControllerSpec httpMessageCodecs(Consumer<ServerCodecConfigurer> configurer)
Configure custom HTTP message readers and writers or override built-in ones.
formatters
WebTestClient.ControllerSpec formatters(Consumer<FormatterRegistry> consumer)
Register formatters and converters to use for type conversion.
validator
WebTestClient.ControllerSpec validator(Validator validator)
Configure a global Validator.
viewResolvers
WebTestClient.ControllerSpec viewResolvers(Consumer<ViewResolverRegistry> consumer)
Configure view resolution.