org.springframework.boot.test.autoconfigure.web.servlet

Annotation Type AutoConfigureMockMvc

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      boolean addFilters
      If filters from the application context should be registered with MockMVC.
      MockMvcPrint print
      How MvcResult information should be printed after each MockMVC invocation.
      boolean printOnlyOnFailure
      If MvcResult information should be printed only if the test fails.
      boolean secure
      If Spring Security's MockMvc support should be auto-configured when it is on the classpath.
      boolean webClientEnabled
      If a WebClient should be auto-configured when HtmlUnit is on the classpath.
      boolean webDriverEnabled
      If a WebDriver should be auto-configured when Selenium is on the classpath.
    • Element Detail

      • addFilters

        public abstract boolean addFilters
        If filters from the application context should be registered with MockMVC. Defaults to true.
        Returns:
        if filters should be added
        Default:
        true
      • printOnlyOnFailure

        public abstract boolean printOnlyOnFailure
        If MvcResult information should be printed only if the test fails.
        Returns:
        true if printing only occurs on failure
        Default:
        true
      • webClientEnabled

        @PropertyMapping(value="webclient.enabled")
        public abstract boolean webClientEnabled
        If a WebClient should be auto-configured when HtmlUnit is on the classpath. Defaults to true.
        Returns:
        if a WebClient is auto-configured
        Default:
        true
      • webDriverEnabled

        @PropertyMapping(value="webdriver.enabled")
        public abstract boolean webDriverEnabled
        If a WebDriver should be auto-configured when Selenium is on the classpath. Defaults to true.
        Returns:
        if a WebDriver is auto-configured
        Default:
        true
      • secure

        public abstract boolean secure
        If Spring Security's MockMvc support should be auto-configured when it is on the classpath. Defaults to true.
        Returns:
        if Spring Security's MockMvc support is auto-configured
        Default:
        true