类 GenericXmlWebContextLoader
- java.lang.Object
- org.springframework.test.context.support.AbstractContextLoader
- org.springframework.test.context.web.AbstractGenericWebContextLoader
- org.springframework.test.context.web.GenericXmlWebContextLoader
- 所有已实现的接口:
ContextLoader
,SmartContextLoader
public class GenericXmlWebContextLoader extends AbstractGenericWebContextLoader
Concrete implementation ofAbstractGenericWebContextLoader
that loads bean definitions from XML resources.Default resource locations are detected using the suffix
"-context.xml"
.- 从以下版本开始:
- 3.2
- 作者:
- Sam Brannen
- 另请参阅:
GenericGroovyXmlWebContextLoader
,AnnotationConfigWebContextLoader
字段概要
从类继承的字段 org.springframework.test.context.web.AbstractGenericWebContextLoader
logger
构造器概要
构造器 构造器 说明 GenericXmlWebContextLoader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected String
getResourceSuffix()
Returns"-context.xml"
in order to support detection of a default XML config file.protected void
loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig)
Load bean definitions into the suppliedcontext
from the locations in the suppliedWebMergedContextConfiguration
, using anXmlBeanDefinitionReader
.protected void
validateMergedContextConfiguration(WebMergedContextConfiguration webMergedConfig)
Ensure that the suppliedWebMergedContextConfiguration
does not containclasses
.从类继承的方法 org.springframework.test.context.web.AbstractGenericWebContextLoader
configureWebResources, customizeBeanFactory, customizeContext, loadContext, loadContext
从类继承的方法 org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, getResourceSuffixes, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
构造器详细资料
GenericXmlWebContextLoader
public GenericXmlWebContextLoader()
方法详细资料
loadBeanDefinitions
protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig)
Load bean definitions into the suppliedcontext
from the locations in the suppliedWebMergedContextConfiguration
, using anXmlBeanDefinitionReader
.- 指定者:
loadBeanDefinitions
在类中AbstractGenericWebContextLoader
- 参数:
context
- the context into which the bean definitions should be loadedwebMergedConfig
- the merged context configuration to use to load the web application context- 另请参阅:
AbstractGenericWebContextLoader.loadBeanDefinitions(org.springframework.web.context.support.GenericWebApplicationContext, org.springframework.test.context.web.WebMergedContextConfiguration)
getResourceSuffix
protected String getResourceSuffix()
Returns"-context.xml"
in order to support detection of a default XML config file.- 指定者:
getResourceSuffix
在类中AbstractContextLoader
- 返回:
- the resource suffix; never
null
or empty - 另请参阅:
AbstractContextLoader.generateDefaultLocations(Class)
,AbstractContextLoader.getResourceSuffixes()
validateMergedContextConfiguration
protected void validateMergedContextConfiguration(WebMergedContextConfiguration webMergedConfig)
Ensure that the suppliedWebMergedContextConfiguration
does not containclasses
.- 覆盖:
validateMergedContextConfiguration
在类中AbstractGenericWebContextLoader
- 参数:
webMergedConfig
- the merged configuration to validate- 从以下版本开始:
- 4.0.4
- 另请参阅:
AbstractGenericWebContextLoader.validateMergedContextConfiguration(org.springframework.test.context.web.WebMergedContextConfiguration)