Friday, January 15, 2016

What is @WebAppConfiguration in Spring MVC

Ref:- http://docs.spring.io/spring-framework/docs/3.2.0.BUILD-SNAPSHOT/api/org/springframework/test/context/web/WebAppConfiguration.html



@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.

No comments:

Post a Comment