Uses of Class
org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder
Packages that use StandaloneMockMvcBuilder
Package
Description
AssertJ support for MockMvc.
Contains built-in
MockMvcBuilder
implementations.-
Uses of StandaloneMockMvcBuilder in org.springframework.test.web.servlet.assertj
Method parameters in org.springframework.test.web.servlet.assertj with type arguments of type StandaloneMockMvcBuilderModifier and TypeMethodDescriptionstatic MockMvcTester
MockMvcTester.of
(Collection<?> controllers, Function<StandaloneMockMvcBuilder, MockMvc> customizations) Create an instance by registering one or more@Controller
instances and configuring Spring MVC infrastructure programmatically. -
Uses of StandaloneMockMvcBuilder in org.springframework.test.web.servlet.setup
Methods in org.springframework.test.web.servlet.setup that return StandaloneMockMvcBuilderModifier and TypeMethodDescriptionStandaloneMockMvcBuilder.addInterceptors
(HandlerInterceptor... interceptors) Add interceptors mapped to all incoming requests.StandaloneMockMvcBuilder.addMappedInterceptors
(String[] pathPatterns, HandlerInterceptor... interceptors) Add interceptors mapped to a set of path patterns.StandaloneMockMvcBuilder.addPlaceholderValue
(String name, String value) In a standalone setup there is no support for placeholder values embedded in request mappings.StandaloneMockMvcBuilder.setAsyncRequestTimeout
(long timeout) Specify the timeout value for async execution.StandaloneMockMvcBuilder.setContentNegotiationManager
(ContentNegotiationManager manager) Set a ContentNegotiationManager.StandaloneMockMvcBuilder.setControllerAdvice
(Object... controllerAdvice) Register one or moreControllerAdvice
instances to be used in tests (specifiedClass
will be turned into instance).StandaloneMockMvcBuilder.setConversionService
(FormattingConversionService conversionService) Provide a conversion service with custom formatters and converters.StandaloneMockMvcBuilder.setCustomArgumentResolvers
(HandlerMethodArgumentResolver... argumentResolvers) Provide custom resolvers for controller method arguments.StandaloneMockMvcBuilder.setCustomHandlerMapping
(Supplier<RequestMappingHandlerMapping> factory) Configure factory to create a customRequestMappingHandlerMapping
.StandaloneMockMvcBuilder.setCustomReturnValueHandlers
(HandlerMethodReturnValueHandler... handlers) Provide custom handlers for controller method return values.StandaloneMockMvcBuilder.setFlashMapManager
(FlashMapManager flashMapManager) Provide a custom FlashMapManager instance.StandaloneMockMvcBuilder.setHandlerExceptionResolvers
(List<HandlerExceptionResolver> exceptionResolvers) Set the HandlerExceptionResolver types to use as a list.StandaloneMockMvcBuilder.setHandlerExceptionResolvers
(HandlerExceptionResolver... exceptionResolvers) Set the HandlerExceptionResolver types to use as an array.StandaloneMockMvcBuilder.setLocaleResolver
(LocaleResolver localeResolver) Provide a LocaleResolver instance.StandaloneMockMvcBuilder.setMessageConverters
(HttpMessageConverter<?>... messageConverters) Set the message converters to use in argument resolvers and in return value handlers, which support reading and/or writing to the body of the request and response.StandaloneMockMvcBuilder.setPatternParser
(PathPatternParser parser) Enable URL path matching with parsedPathPatterns
instead of String pattern matching with aPathMatcher
.StandaloneMockMvcBuilder.setRemoveSemicolonContent
(boolean removeSemicolonContent) Set if ";" (semicolon) content should be stripped from the request URI.StandaloneMockMvcBuilder.setSingleView
(View view) Sets up a singleViewResolver
that always returns the provided view instance.StandaloneMockMvcBuilder.setUseSuffixPatternMatch
(boolean useSuffixPatternMatch) Deprecated.as of 5.2.4.StandaloneMockMvcBuilder.setUseTrailingSlashPatternMatch
(boolean useTrailingSlashPatternMatch) Deprecated.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
StandaloneMockMvcBuilder.setValidator
(Validator validator) Provide a customValidator
instead of the one created by default.StandaloneMockMvcBuilder.setViewResolvers
(ViewResolver... resolvers) Set up view resolution with the givenViewResolvers
.static StandaloneMockMvcBuilder
MockMvcBuilders.standaloneSetup
(Object... controllers) Build aMockMvc
instance by registering one or more@Controller
instances and configuring Spring MVC infrastructure programmatically.