Class AbstractGenericWebContextLoader

java.lang.Object
org.springframework.test.context.support.AbstractContextLoader
org.springframework.test.context.web.AbstractGenericWebContextLoader
All Implemented Interfaces:
AotContextLoader, ContextLoader, SmartContextLoader
Direct Known Subclasses:
AnnotationConfigWebContextLoader, GenericXmlWebContextLoader

public abstract class AbstractGenericWebContextLoader extends AbstractContextLoader implements AotContextLoader
Abstract, generic extension of AbstractContextLoader that loads a GenericWebApplicationContext.

If instances of concrete subclasses are invoked via the SmartContextLoader SPI, the context will be loaded from the MergedContextConfiguration provided to loadContext(MergedContextConfiguration). In such cases, a SmartContextLoader will decide whether to load the context from locations or annotated classes. Note that AbstractGenericWebContextLoader does not support the loadContext(String... locations) method from the legacy ContextLoader SPI.

Concrete subclasses must provide an appropriate implementation of loadBeanDefinitions(org.springframework.web.context.support.GenericWebApplicationContext, org.springframework.test.context.web.WebMergedContextConfiguration).

Since:
3.2
Author:
Sam Brannen, Phillip Webb
See Also: