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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final MockMvccreateMockMvc(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, Charset defaultResponseCharacterEncoding, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, List<DispatcherServletCustomizer> dispatcherServletCustomizers) Delegates tocreateMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)for creation of theMockMvcinstance and configures that instance with the supplieddefaultResponseCharacterEncoding.protected final MockMvccreateMockMvc(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, 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 theMockMvcinstance 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)
-