Package | Description |
---|---|
org.springframework.test.web.reactive.server |
Support for testing Spring WebFlux server endpoints via
WebTestClient . |
Modifier and Type | Method and Description |
---|---|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.argumentResolvers(Consumer<ArgumentResolverConfigurer> configurer)
Configure resolvers for custom controller method arguments.
|
static WebTestClient.ControllerSpec |
WebTestClient.bindToController(Object... controllers)
Use this server setup to test one `@Controller` at a time.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.contentTypeResolver(Consumer<RequestedContentTypeResolverBuilder> consumer)
Customize content type resolution.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.controllerAdvice(Object... controllerAdvice)
Register one or more
ControllerAdvice
instances to be used in tests (specified Class will be turned into instance). |
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.corsMappings(Consumer<CorsRegistry> consumer)
Configure CORS support.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.formatters(Consumer<FormatterRegistry> consumer)
Register formatters and converters to use for type conversion.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.httpMessageCodecs(Consumer<ServerCodecConfigurer> configurer)
Configure custom HTTP message readers and writers or override built-in ones.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.pathMatching(Consumer<PathMatchConfigurer> consumer)
Configure path matching options.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.validator(Validator validator)
Configure a global Validator.
|
WebTestClient.ControllerSpec |
WebTestClient.ControllerSpec.viewResolvers(Consumer<ViewResolverRegistry> consumer)
Configure view resolution.
|