Class GenericXmlContextLoader
java.lang.Object
org.springframework.test.context.support.AbstractContextLoader
org.springframework.test.context.support.AbstractGenericContextLoader
org.springframework.test.context.support.GenericXmlContextLoader
- All Implemented Interfaces:
AotContextLoader,ContextLoader,SmartContextLoader
- Direct Known Subclasses:
GenericGroovyXmlContextLoader
Concrete implementation of
AbstractGenericContextLoader that reads
bean definitions from XML resources.
Default resource locations are detected using the suffix
"-context.xml".
- Since:
- 2.5
- Author:
- Sam Brannen
- See Also:
-
Field Summary
Fields inherited from class org.springframework.test.context.support.AbstractGenericContextLoader
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BeanDefinitionReaderCreate a newXmlBeanDefinitionReader.protected StringReturns"-context.xml"in order to support detection of a default XML config file.protected voidvalidateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containclasses.Methods inherited from class org.springframework.test.context.support.AbstractGenericContextLoader
createContext, customizeBeanFactory, customizeContext, loadBeanDefinitions, loadContext, loadContext, loadContextForAotProcessing, loadContextForAotRuntime, prepareContextMethods 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
-
GenericXmlContextLoader
public GenericXmlContextLoader()
-
-
Method Details
-
createBeanDefinitionReader
Create a newXmlBeanDefinitionReader.- Specified by:
createBeanDefinitionReaderin classAbstractGenericContextLoader- Parameters:
context- the context for which theBeanDefinitionReadershould be created- Returns:
- a new
XmlBeanDefinitionReader - 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 suppliedMergedContextConfigurationdoes not containclasses.- Overrides:
validateMergedContextConfigurationin classAbstractGenericContextLoader- Parameters:
mergedConfig- the merged configuration to validate- Since:
- 4.0.4
- See Also:
-