注释类型 AutoConfigureMockMvc

    • 可选元素概要

      可选元素 
      修饰符和类型可选元素说明
      booleanaddFilters
      If filters from the application context should be registered with MockMVC.
      MockMvcPrintprint
      How MvcResult information should be printed after each MockMVC invocation.
      booleanprintOnlyOnFailure
      If MvcResult information should be printed only if the test fails.
      booleansecure
      If Spring Security's MockMvc support should be auto-configured when it is on the classpath.
      booleanwebClientEnabled
      If a WebClient should be auto-configured when HtmlUnit is on the classpath.
      booleanwebDriverEnabled
      If a WebDriver should be auto-configured when Selenium is on the classpath.
    • 元素详细资料

      • addFilters

        boolean addFilters
        If filters from the application context should be registered with MockMVC. Defaults to true.
        返回:
        if filters should be added
        默认值:
        true
      • printOnlyOnFailure

        boolean printOnlyOnFailure
        If MvcResult information should be printed only if the test fails.
        返回:
        true if printing only occurs on failure
        默认值:
        true
      • webClientEnabled

        @PropertyMapping("webclient.enabled")
        boolean webClientEnabled
        If a WebClient should be auto-configured when HtmlUnit is on the classpath. Defaults to true.
        返回:
        if a WebClient is auto-configured
        默认值:
        true
      • webDriverEnabled

        @PropertyMapping("webdriver.enabled")
        boolean webDriverEnabled
        If a WebDriver should be auto-configured when Selenium is on the classpath. Defaults to true.
        返回:
        if a WebDriver is auto-configured
        默认值:
        true
      • secure

        boolean secure
        If Spring Security's MockMvc support should be auto-configured when it is on the classpath. Defaults to true.
        返回:
        if Spring Security's MockMvc support is auto-configured
        默认值:
        true