spring-framework / org.springframework.test.context.web / AnnotationConfigWebContextLoader / <init>

<init>

AnnotationConfigWebContextLoader()

Concrete implementation of AbstractGenericWebContextLoader that loads bean definitions from annotated classes.

See the Javadoc for org.springframework.test.context.ContextConfiguration for a definition of annotated class.

Note: AnnotationConfigWebContextLoader supports annotated classes rather than the String-based resource locations defined by the legacy org.springframework.test.context.ContextLoader API. Thus, although AnnotationConfigWebContextLoader extends AbstractGenericWebContextLoader, AnnotationConfigWebContextLoader does not support any String-based methods defined by org.springframework.test.context.support.AbstractContextLoader or AbstractGenericWebContextLoader. Consequently, AnnotationConfigWebContextLoader should chiefly be considered a org.springframework.test.context.SmartContextLoader rather than a org.springframework.test.context.ContextLoader.

Author
Sam Brannen

Since
3.2

See Also
#processContextConfiguration(ContextConfigurationAttributes)#detectDefaultConfigurationClasses(Class)#loadBeanDefinitions(GenericWebApplicationContext, WebMergedContextConfiguration)GenericXmlWebContextLoaderGenericGroovyXmlWebContextLoader