Annotation Interface AutoConfigureMockMvc
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Documented
@Inherited
@ImportAutoConfiguration
@PropertyMapping("spring.test.mockmvc")
public @interface AutoConfigureMockMvc
Annotation that can be applied to a test class to enable and configure
 auto-configuration of 
MockMvc. If AssertJ is available a MockMvcTester
 is auto-configured as well.- Since:
- 1.4.0
- Author:
- Phillip Webb
- See Also:
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionbooleanIf filters from the application context should be registered with MockMVC.HowMvcResultinformation should be printed after each MockMVC invocation.booleanIfMvcResultinformation should be printed only if the test fails.booleanIf aWebClientshould be auto-configured when HtmlUnit is on the classpath.booleanIf aWebDrivershould be auto-configured when Selenium is on the classpath.
- 
Element Details- 
addFiltersboolean addFiltersIf filters from the application context should be registered with MockMVC. Defaults totrue.- Returns:
- if filters should be added
 - Default:
- true
 
- 
printHowMvcResultinformation should be printed after each MockMVC invocation.- Returns:
- how information is printed
 - Default:
- DEFAULT
 
- 
printOnlyOnFailureboolean printOnlyOnFailureIfMvcResultinformation should be printed only if the test fails.- Returns:
- trueif printing only occurs on failure
 - Default:
- true
 
- 
webClientEnabledIf aWebClientshould be auto-configured when HtmlUnit is on the classpath. Defaults totrue.- Returns:
- if a WebClientis auto-configured
 - Default:
- true
 
- 
webDriverEnabledIf aWebDrivershould be auto-configured when Selenium is on the classpath. Defaults totrue.- Returns:
- if a WebDriveris auto-configured
 - Default:
- true
 
 
-