Interface MockMvcWebTestClient.ControllerSpec
- All Superinterfaces:
- MockMvcWebTestClient.MockMvcServerSpec<MockMvcWebTestClient.ControllerSpec>
- Enclosing interface:
- MockMvcWebTestClient
MockMvc to test one or more
controllers directly, and a simple facade around
StandaloneMockMvcBuilder.- Since:
- 5.3
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptionapiVersionStrategy(ApiVersionStrategy versionStrategy) Set theApiVersionStrategyto use when mapping requests.asyncRequestTimeout(long timeout) Specify the timeout value for async execution.Set a ContentNegotiationManager.controllerAdvice(Object... controllerAdvice) RegisterControllerAdviceconversionService(FormattingConversionService conversionService) Provide a conversion service.customArgumentResolvers(HandlerMethodArgumentResolver... argumentResolvers) Provide custom argument resolvers.Configure factory for a customRequestMappingHandlerMapping.customReturnValueHandlers(HandlerMethodReturnValueHandler... handlers) Provide custom return value handlers.flashMapManager(FlashMapManager flashMapManager) Provide a custom FlashMapManager.handlerExceptionResolvers(HandlerExceptionResolver... exceptionResolvers) Set the HandlerExceptionResolver types to use.interceptors(HandlerInterceptor... interceptors) Add global interceptors.localeResolver(LocaleResolver localeResolver) Provide the LocaleResolver to use.mappedInterceptors(String @Nullable [] pathPatterns, HandlerInterceptor... interceptors) Add interceptors for specific patterns.messageConverters(HttpMessageConverter<?>... messageConverters) Set the message converters to use.patternParser(PathPatternParser parser) Enable URL path matching with parsedPathPatterns.placeholderValue(String name, String value) Configure placeholder values to use.singleView(View view) Set up a singleViewResolverwith a fixed view.Provide a customValidator.viewResolvers(ViewResolver... resolvers) Set up view resolution.Methods inherited from interface MockMvcWebTestClient.MockMvcServerSpecalwaysExpect, apply, build, configureClient, defaultRequest, dispatcherServletCustomizer, dispatchOptions, filter, filters
- 
Method Details- 
controllerAdviceRegisterControllerAdviceThis is delegated to StandaloneMockMvcBuilder.setControllerAdvice(Object...).
- 
messageConvertersSet the message converters to use.This is delegated to StandaloneMockMvcBuilder.setMessageConverters(HttpMessageConverter[]).
- 
validatorProvide a customValidator.This is delegated to StandaloneMockMvcBuilder.setValidator(Validator).
- 
conversionServiceMockMvcWebTestClient.ControllerSpec conversionService(FormattingConversionService conversionService) Provide a conversion service.This is delegated to StandaloneMockMvcBuilder.setConversionService(FormattingConversionService).
- 
apiVersionStrategySet theApiVersionStrategyto use when mapping requests.This is delegated to StandaloneMockMvcBuilder.setApiVersionStrategy(ApiVersionStrategy).- Since:
- 7.0
 
- 
interceptorsAdd global interceptors.This is delegated to StandaloneMockMvcBuilder.addInterceptors(HandlerInterceptor...).
- 
mappedInterceptorsMockMvcWebTestClient.ControllerSpec mappedInterceptors(String @Nullable [] pathPatterns, HandlerInterceptor... interceptors) Add interceptors for specific patterns.This is delegated to StandaloneMockMvcBuilder.addMappedInterceptors(String[], HandlerInterceptor...).
- 
contentNegotiationManagerSet a ContentNegotiationManager.This is delegated to StandaloneMockMvcBuilder.setContentNegotiationManager(ContentNegotiationManager).
- 
asyncRequestTimeoutSpecify the timeout value for async execution.This is delegated to StandaloneMockMvcBuilder.setAsyncRequestTimeout(long).
- 
customArgumentResolversMockMvcWebTestClient.ControllerSpec customArgumentResolvers(HandlerMethodArgumentResolver... argumentResolvers) Provide custom argument resolvers.This is delegated to StandaloneMockMvcBuilder.setCustomArgumentResolvers(HandlerMethodArgumentResolver...).
- 
customReturnValueHandlersMockMvcWebTestClient.ControllerSpec customReturnValueHandlers(HandlerMethodReturnValueHandler... handlers) Provide custom return value handlers.This is delegated to StandaloneMockMvcBuilder.setCustomReturnValueHandlers(HandlerMethodReturnValueHandler...).
- 
handlerExceptionResolversMockMvcWebTestClient.ControllerSpec handlerExceptionResolvers(HandlerExceptionResolver... exceptionResolvers) Set the HandlerExceptionResolver types to use.This is delegated to StandaloneMockMvcBuilder.setHandlerExceptionResolvers(HandlerExceptionResolver...).
- 
viewResolversSet up view resolution.This is delegated to StandaloneMockMvcBuilder.setViewResolvers(ViewResolver...).
- 
singleViewSet up a singleViewResolverwith a fixed view.This is delegated to StandaloneMockMvcBuilder.setSingleView(View).
- 
localeResolverProvide the LocaleResolver to use.This is delegated to StandaloneMockMvcBuilder.setLocaleResolver(LocaleResolver).
- 
flashMapManagerProvide a custom FlashMapManager.This is delegated to StandaloneMockMvcBuilder.setFlashMapManager(FlashMapManager).
- 
patternParserEnable URL path matching with parsedPathPatterns.This is delegated to StandaloneMockMvcBuilder.setPatternParser(PathPatternParser).
- 
placeholderValueConfigure placeholder values to use.This is delegated to StandaloneMockMvcBuilder.addPlaceholderValue(String, String).
- 
customHandlerMappingMockMvcWebTestClient.ControllerSpec customHandlerMapping(Supplier<RequestMappingHandlerMapping> factory) Configure factory for a customRequestMappingHandlerMapping.This is delegated to StandaloneMockMvcBuilder.setCustomHandlerMapping(Supplier).
 
-