@Configuration(proxyBeanMethods=false) @ConditionalOnWebApplication(type=SERVLET) @AutoConfigureAfter(value=WebMvcAutoConfiguration.class) @EnableConfigurationProperties(value={ServerProperties.class,WebMvcProperties.class}) public class MockMvcAutoConfiguration extends Object
MockMvc
.AutoConfigureWebMvc
Modifier and Type | Method and Description |
---|---|
DispatcherServlet |
dispatcherServlet(MockMvc mockMvc) |
DispatcherServletPath |
dispatcherServletPath() |
MockMvc |
mockMvc(MockMvcBuilder builder) |
DefaultMockMvcBuilder |
mockMvcBuilder(List<MockMvcBuilderCustomizer> customizers) |
SpringBootMockMvcBuilderCustomizer |
springBootMockMvcBuilderCustomizer() |
@Bean @ConditionalOnMissingBean public DispatcherServletPath dispatcherServletPath()
@Bean @ConditionalOnMissingBean(value=org.springframework.test.web.servlet.MockMvcBuilder.class) public DefaultMockMvcBuilder mockMvcBuilder(List<MockMvcBuilderCustomizer> customizers)
@Bean @ConfigurationProperties(prefix="spring.test.mockmvc") public SpringBootMockMvcBuilderCustomizer springBootMockMvcBuilderCustomizer()
@Bean @ConditionalOnMissingBean public MockMvc mockMvc(MockMvcBuilder builder)
@Bean @ConditionalOnMissingBean public DispatcherServlet dispatcherServlet(MockMvc mockMvc)