类 GenericGroovyXmlContextLoader
- java.lang.Object
- org.springframework.test.context.support.AbstractContextLoader
- org.springframework.test.context.support.AbstractGenericContextLoader
- org.springframework.test.context.support.GenericXmlContextLoader
- org.springframework.test.context.support.GenericGroovyXmlContextLoader
- 所有已实现的接口:
ContextLoader,SmartContextLoader
public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader
Concrete implementation ofAbstractGenericContextLoaderthat reads 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,GenericXmlContextLoader,AnnotationConfigContextLoader
字段概要
从类继承的字段 org.springframework.test.context.support.AbstractGenericContextLoader
logger
构造器概要
构造器 构造器 说明 GenericGroovyXmlContextLoader()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected StringgetResourceSuffix()GenericGroovyXmlContextLoadersupports 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(GenericApplicationContext context, MergedContextConfiguration mergedConfig)Load bean definitions into the suppliedcontextfrom the locations in the suppliedMergedContextConfigurationusing aGroovyBeanDefinitionReader.从类继承的方法 org.springframework.test.context.support.GenericXmlContextLoader
createBeanDefinitionReader, validateMergedContextConfiguration
从类继承的方法 org.springframework.test.context.support.AbstractGenericContextLoader
customizeBeanFactory, customizeContext, loadContext, loadContext, prepareContext
从类继承的方法 org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
构造器详细资料
GenericGroovyXmlContextLoader
public GenericGroovyXmlContextLoader()
方法详细资料
loadBeanDefinitions
protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig)
Load bean definitions into the suppliedcontextfrom the locations in the suppliedMergedContextConfigurationusing aGroovyBeanDefinitionReader.- 覆盖:
loadBeanDefinitions在类中AbstractGenericContextLoader- 参数:
context- the context into which the bean definitions should be loadedmergedConfig- the merged context configuration- 另请参阅:
AbstractGenericContextLoader.loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext, org.springframework.test.context.MergedContextConfiguration)
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()
GenericGroovyXmlContextLoadersupports both Groovy and XML resource types for detection of defaults. Consequently, this method is not supported.- 覆盖:
getResourceSuffix在类中GenericXmlContextLoader- 返回:
- the resource suffix; never
nullor empty - 抛出:
UnsupportedOperationException- in this implementation- 另请参阅:
getResourceSuffixes()