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(org.springframework.web.accept.ContentNegotiationManager manager)
Set a ContentNegotiationManager.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.controllerAdvice(Object... controllerAdvice)
Register
org.springframework.web.bind.annotation.ControllerAdvice |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.conversionService(org.springframework.format.support.FormattingConversionService conversionService)
Provide a conversion service.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customArgumentResolvers(org.springframework.web.method.support.HandlerMethodArgumentResolver... argumentResolvers)
Provide custom argument resolvers.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customHandlerMapping(Supplier<org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping> factory)
Configure factory for a custom
RequestMappingHandlerMapping . |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.customReturnValueHandlers(org.springframework.web.method.support.HandlerMethodReturnValueHandler... handlers)
Provide custom return value handlers.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.flashMapManager(org.springframework.web.servlet.FlashMapManager flashMapManager)
Provide a custom FlashMapManager.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.handlerExceptionResolvers(org.springframework.web.servlet.HandlerExceptionResolver... exceptionResolvers)
Set the HandlerExceptionResolver types to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.interceptors(org.springframework.web.servlet.HandlerInterceptor... interceptors)
Add global interceptors.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.localeResolver(org.springframework.web.servlet.LocaleResolver localeResolver)
Provide the LocaleResolver to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.mappedInterceptors(String[] pathPatterns,
org.springframework.web.servlet.HandlerInterceptor... interceptors)
Add interceptors for specific patterns.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
Set the message converters to use.
|
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.patternParser(org.springframework.web.util.pattern.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(org.springframework.web.servlet.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(org.springframework.validation.Validator validator)
Provide a custom
Validator . |
MockMvcWebTestClient.ControllerSpec |
MockMvcWebTestClient.ControllerSpec.viewResolvers(org.springframework.web.servlet.ViewResolver... resolvers)
Set up view resolution.
|