public interface MockMvcConfigurer
ConfigurableMockMvcBuilder
for some specific purpose. A 3rd party
library may use this to provide shortcuts for setting up MockMvc.
Can be plugged in via ConfigurableMockMvcBuilder.apply(org.springframework.test.web.servlet.setup.MockMvcConfigurer)
with
instances of this type likely created via static methods, e.g.:
MockMvcBuilders.webAppContextSetup(context).apply(mySetup("foo","bar")).build();
MockMvcConfigurerAdapter
Modifier and Type | Method and Description |
---|---|
void |
afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder)
Invoked immediately after a
MockMvcConfigurer is added via
ConfigurableMockMvcBuilder.apply(org.springframework.test.web.servlet.setup.MockMvcConfigurer) . |
RequestPostProcessor |
beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
WebApplicationContext context)
Invoked just before the MockMvc instance is created.
|
void afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder)
MockMvcConfigurer
is added via
ConfigurableMockMvcBuilder.apply(org.springframework.test.web.servlet.setup.MockMvcConfigurer)
.RequestPostProcessor beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)
MockMvc
instance.