类 GenericXmlContextLoader
- java.lang.Object
- org.springframework.test.context.support.AbstractContextLoader
- org.springframework.test.context.support.AbstractGenericContextLoader
- org.springframework.test.context.support.GenericXmlContextLoader
- 所有已实现的接口:
ContextLoader,SmartContextLoader
public class GenericXmlContextLoader extends AbstractGenericContextLoader
Concrete implementation ofAbstractGenericContextLoaderthat reads bean definitions from XML resources.Default resource locations are detected using the suffix
"-context.xml".- 从以下版本开始:
- 2.5
- 作者:
- Sam Brannen
- 另请参阅:
XmlBeanDefinitionReader,GenericGroovyXmlContextLoader,AnnotationConfigContextLoader
字段概要
从类继承的字段 org.springframework.test.context.support.AbstractGenericContextLoader
logger
构造器概要
构造器 构造器 说明 GenericXmlContextLoader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected BeanDefinitionReadercreateBeanDefinitionReader(GenericApplicationContext context)Create a newXmlBeanDefinitionReader.protected StringgetResourceSuffix()Returns"-context.xml"in order to support detection of a default XML config file.protected voidvalidateMergedContextConfiguration(MergedContextConfiguration mergedConfig)Ensure that the suppliedMergedContextConfigurationdoes not containclasses.从类继承的方法 org.springframework.test.context.support.AbstractGenericContextLoader
createContext, customizeBeanFactory, customizeContext, loadBeanDefinitions, loadContext, loadContext, prepareContext
从类继承的方法 org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, getResourceSuffixes, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
构造器详细资料
GenericXmlContextLoader
public GenericXmlContextLoader()
方法详细资料
createBeanDefinitionReader
protected BeanDefinitionReader createBeanDefinitionReader(GenericApplicationContext context)
Create a newXmlBeanDefinitionReader.- 指定者:
createBeanDefinitionReader在类中AbstractGenericContextLoader- 参数:
context- the context for which theBeanDefinitionReadershould be created- 返回:
- a new
XmlBeanDefinitionReader - 另请参阅:
AbstractGenericContextLoader.loadContext(String...),AbstractGenericContextLoader.loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext, org.springframework.test.context.MergedContextConfiguration),BeanDefinitionReader
getResourceSuffix
protected String getResourceSuffix()
Returns"-context.xml"in order to support detection of a default XML config file.- 指定者:
getResourceSuffix在类中AbstractContextLoader- 返回:
- the resource suffix; never
nullor empty - 另请参阅:
AbstractContextLoader.generateDefaultLocations(Class),AbstractContextLoader.getResourceSuffixes()
validateMergedContextConfiguration
protected void validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Ensure that the suppliedMergedContextConfigurationdoes not containclasses.- 覆盖:
validateMergedContextConfiguration在类中AbstractGenericContextLoader- 参数:
mergedConfig- the merged configuration to validate- 从以下版本开始:
- 4.0.4
- 另请参阅:
AbstractGenericContextLoader.validateMergedContextConfiguration(org.springframework.test.context.MergedContextConfiguration)