类 GenericGroovyXmlWebContextLoader
- java.lang.Object
- org.springframework.test.context.support.AbstractContextLoader
- org.springframework.test.context.web.AbstractGenericWebContextLoader
- org.springframework.test.context.web.GenericXmlWebContextLoader
- org.springframework.test.context.web.GenericGroovyXmlWebContextLoader
- 所有已实现的接口:
ContextLoader,SmartContextLoader
public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
Concrete implementation ofAbstractGenericWebContextLoaderthat loads bean definitions from Groovy scripts and XML configuration files.Default resource locations are detected using the suffixes
"-context.xml"and"Context.groovy".- 从以下版本开始:
- 4.1
- 作者:
- Sam Brannen
- 另请参阅:
GroovyBeanDefinitionReader,GenericXmlWebContextLoader,AnnotationConfigWebContextLoader
字段概要
从类继承的字段 org.springframework.test.context.web.AbstractGenericWebContextLoader
logger
构造器概要
构造器 构造器 说明 GenericGroovyXmlWebContextLoader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected StringgetResourceSuffix()GenericGroovyXmlWebContextLoadersupports both Groovy and XML resource types for detection of defaults.protected String[]getResourceSuffixes()Returns"-context.xml" and "Context.groovy"in order to support detection of a default XML config file or Groovy script.protected voidloadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig)Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfigurationusing aGroovyBeanDefinitionReader.从类继承的方法 org.springframework.test.context.web.GenericXmlWebContextLoader
validateMergedContextConfiguration
从类继承的方法 org.springframework.test.context.web.AbstractGenericWebContextLoader
configureWebResources, customizeBeanFactory, customizeContext, loadContext, loadContext
从类继承的方法 org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
构造器详细资料
GenericGroovyXmlWebContextLoader
public GenericGroovyXmlWebContextLoader()
方法详细资料
loadBeanDefinitions
protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig)
Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfigurationusing aGroovyBeanDefinitionReader.- 覆盖:
loadBeanDefinitions在类中GenericXmlWebContextLoader- 参数:
context- the context into which the bean definitions should be loadedwebMergedConfig- the merged context configuration- 另请参阅:
AbstractGenericWebContextLoader.loadBeanDefinitions(org.springframework.web.context.support.GenericWebApplicationContext, org.springframework.test.context.web.WebMergedContextConfiguration)
getResourceSuffixes
protected String[] getResourceSuffixes()
Returns"-context.xml" and "Context.groovy"in order to support detection of a default XML config file or Groovy script.- 覆盖:
getResourceSuffixes在类中AbstractContextLoader- 返回:
- the resource suffixes; never
nullor empty - 另请参阅:
AbstractContextLoader.generateDefaultLocations(Class)
getResourceSuffix
protected String getResourceSuffix()
GenericGroovyXmlWebContextLoadersupports both Groovy and XML resource types for detection of defaults. Consequently, this method is not supported.- 覆盖:
getResourceSuffix在类中GenericXmlWebContextLoader- 返回:
- the resource suffix; never
nullor empty - 抛出:
UnsupportedOperationException- in this implementation- 另请参阅:
getResourceSuffixes()