Class GenericXmlWebContextLoader
java.lang.Object
org.springframework.test.context.support.AbstractContextLoader
org.springframework.test.context.web.AbstractGenericWebContextLoader
org.springframework.test.context.web.GenericXmlWebContextLoader
- All Implemented Interfaces:
 AotContextLoader,ContextLoader,SmartContextLoader
- Direct Known Subclasses:
 GenericGroovyXmlWebContextLoader
Concrete implementation of 
AbstractGenericWebContextLoader that loads
 bean definitions from XML resources.
 Default resource locations are detected using the suffix
 "-context.xml".
- Since:
 - 3.2
 - Author:
 - Sam Brannen
 - See Also:
 
- 
Field Summary
Fields inherited from class org.springframework.test.context.web.AbstractGenericWebContextLoader
logger - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns"-context.xml"in order to support detection of a default XML config file.protected voidloadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfiguration, using anXmlBeanDefinitionReader.protected voidvalidateMergedContextConfiguration(WebMergedContextConfiguration webMergedConfig) Ensure that the suppliedWebMergedContextConfigurationdoes not containclasses.Methods inherited from class org.springframework.test.context.web.AbstractGenericWebContextLoader
configureWebResources, createContext, customizeBeanFactory, customizeContext, loadContext, loadContext, loadContextForAotProcessing, loadContextForAotRuntimeMethods inherited from class org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, getResourceSuffixes, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocationsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.test.context.SmartContextLoader
processContextConfiguration, processLocations 
- 
Constructor Details
- 
GenericXmlWebContextLoader
public GenericXmlWebContextLoader() 
 - 
 - 
Method Details
- 
loadBeanDefinitions
protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfiguration, using anXmlBeanDefinitionReader.- Specified by:
 loadBeanDefinitionsin classAbstractGenericWebContextLoader- Parameters:
 context- the context into which the bean definitions should be loadedwebMergedConfig- the merged context configuration to use to load the web application context- See Also:
 
 - 
getResourceSuffix
Returns"-context.xml"in order to support detection of a default XML config file.- Specified by:
 getResourceSuffixin classAbstractContextLoader- Returns:
 - the resource suffix; never 
nullor empty - See Also:
 
 - 
validateMergedContextConfiguration
Ensure that the suppliedWebMergedContextConfigurationdoes not containclasses.- Overrides:
 validateMergedContextConfigurationin classAbstractGenericWebContextLoader- Parameters:
 webMergedConfig- the merged configuration to validate- Since:
 - 4.0.4
 - See Also:
 
 
 -