WebAppConfiguration (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.test.context.web

## Annotation Type WebAppConfiguration

-     @Documented
      @Inherited
      @Retention(value=RUNTIME)
      @Target(value=TYPE)
      public @interface WebAppConfiguration

  `@WebAppConfiguration` is a class-level annotation that is used to declare that the `ApplicationContext` loaded for an integration test should be a `WebApplicationContext`.

  The mere presence of `@WebAppConfiguration` on a test class ensures that a `WebApplicationContext` will be loaded for the test using a default for the path to the root of the web application. To override the default, specify an explicit resource path via the `value()` attribute.

  Note that `@WebAppConfiguration` must be used in conjunction with `@ContextConfiguration`, either within a single test class or within a test class hierarchy.

  Since:
    3.2
  Author:
    Sam Brannen
  See Also:
    `WebApplicationContext`, `ContextConfiguration`, `ServletTestExecutionListener`

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `value` The resource path to the root directory of the web application.

- - ### Element Detail

    - #### value

          public abstract String value

      The resource path to the root directory of the web application.

      A path that does not include a Spring resource prefix (e.g., `classpath:`, `file:`, etc.) will be interpreted as a file system resource, and a path should not end with a slash.

      Defaults to `"src/main/webapp"` as a file system resource. Note that this is the standard directory for the root of a web application in a project that follows the standard Maven project layout for a WAR.

      Default:
        "src/main/webapp"