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:
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected BeanDefinitionReader
Create a newXmlBeanDefinitionReader
.protected String
Returns"-context.xml"
in order to support detection of a default XML config file.protected void
validateMergedContextConfiguration
(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfiguration
does not containclasses
.Methods inherited from class org.springframework.test.context.support.AbstractGenericContextLoader
createContext, customizeBeanFactory, customizeContext, loadBeanDefinitions, loadContext, loadContext, prepareContext
Methods inherited from class org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, getResourceSuffixes, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
-
Constructor Details
-
GenericXmlContextLoader
public GenericXmlContextLoader()
-
-
Method Details
-
createBeanDefinitionReader
Create a newXmlBeanDefinitionReader
.- Specified by:
createBeanDefinitionReader
in classAbstractGenericContextLoader
- Parameters:
context
- the context for which theBeanDefinitionReader
should 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:
getResourceSuffix
in classAbstractContextLoader
- Returns:
- the resource suffix; never
null
or empty - See Also:
-
validateMergedContextConfiguration
Ensure that the suppliedMergedContextConfiguration
does not containclasses
.- Overrides:
validateMergedContextConfiguration
in classAbstractGenericContextLoader
- Parameters:
mergedConfig
- the merged configuration to validate- Since:
- 4.0.4
- See Also:
-