Package | Description |
---|---|
org.springframework.test.web.servlet.client |
Support for testing Spring MVC applications via
WebTestClient
with MockMvc for server request
handling. |
Modifier and Type | Method and Description |
---|---|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.asyncRequestTimeout(long timeout)
Specify the timeout value for async execution.
|
static MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.bindToController(Object... controllers)
Begin creating a
WebTestClient by providing the @Controller
instance(s) to handle requests with. |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.contentNegotiationManager(ContentNegotiationManager manager)
Set a ContentNegotiationManager.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.controllerAdvice(Object... controllerAdvice)
Register
ControllerAdvice |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.conversionService(FormattingConversionService conversionService)
Provide a conversion service.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customArgumentResolvers(HandlerMethodArgumentResolver... argumentResolvers)
Provide custom argument resolvers.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customHandlerMapping(Supplier<RequestMappingHandlerMapping> factory)
Configure factory for a custom
RequestMappingHandlerMapping . |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customReturnValueHandlers(HandlerMethodReturnValueHandler... handlers)
Provide custom return value handlers.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.flashMapManager(FlashMapManager flashMapManager)
Provide a custom FlashMapManager.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.handlerExceptionResolvers(HandlerExceptionResolver... exceptionResolvers)
Set the HandlerExceptionResolver types to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.interceptors(HandlerInterceptor... interceptors)
Add global interceptors.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.localeResolver(LocaleResolver localeResolver)
Provide the LocaleResolver to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.mappedInterceptors(String[] pathPatterns,
HandlerInterceptor... interceptors)
Add interceptors for specific patterns.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.messageConverters(HttpMessageConverter<?>... messageConverters)
Set the message converters to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.patternParser(PathPatternParser parser)
Enable URL path matching with parsed
PathPatterns . |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.placeholderValue(String name,
String value)
Configure placeholder values to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.singleView(View view)
Set up a single
ViewResolver with a fixed view. |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.useTrailingSlashPatternMatch(boolean useTrailingSlashPatternMatch)
Whether to match trailing slashes.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.validator(Validator validator)
Provide a custom
Validator . |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.viewResolvers(ViewResolver... resolvers)
Set up view resolution.
|