Class MockMvcBuilderSupport
java.lang.Object
org.springframework.test.web.servlet.MockMvcBuilderSupport
- Direct Known Subclasses:
AbstractMockMvcBuilder
Base class for MockMvc builder implementations, providing the capability to
create a
MockMvc
instance.
DefaultMockMvcBuilder
,
which derives from this class, provides a concrete build
method,
and delegates to abstract methods to obtain a WebApplicationContext
.
- Since:
- 3.2
- Author:
- Rossen Stoyanchev, Rob Winch, Stephane Nicoll, Sam Brannen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final MockMvc
createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, @Nullable RequestBuilder defaultRequestBuilder, @Nullable Charset defaultResponseCharacterEncoding, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, @Nullable List<DispatcherServletCustomizer> dispatcherServletCustomizers) Delegates tocreateMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)
for creation of theMockMvc
instance and configures that instance with the supplieddefaultResponseCharacterEncoding
.protected final MockMvc
createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, @Nullable RequestBuilder defaultRequestBuilder, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, @Nullable List<DispatcherServletCustomizer> dispatcherServletCustomizers)
-
Constructor Details
-
MockMvcBuilderSupport
public MockMvcBuilderSupport()
-
-
Method Details
-
createMockMvc
protected final MockMvc createMockMvc(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, @Nullable RequestBuilder defaultRequestBuilder, @Nullable Charset defaultResponseCharacterEncoding, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, @Nullable List<DispatcherServletCustomizer> dispatcherServletCustomizers) Delegates tocreateMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)
for creation of theMockMvc
instance and configures that instance with the supplieddefaultResponseCharacterEncoding
.- Since:
- 5.3.10
-
createMockMvc
protected final MockMvc createMockMvc(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, @Nullable RequestBuilder defaultRequestBuilder, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, @Nullable List<DispatcherServletCustomizer> dispatcherServletCustomizers)
-