public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader
AbstractGenericContextLoader
that reads
bean definitions from Groovy scripts and XML configuration files.
Default resource locations are detected using the suffixes
"-context.xml"
and "Context.groovy"
.
GroovyBeanDefinitionReader
,
GenericXmlContextLoader
,
AnnotationConfigContextLoader
logger
Constructor and Description |
---|
GenericGroovyXmlContextLoader() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getResourceSuffix()
GenericGroovyXmlContextLoader supports both Groovy and XML
resource types for detection of defaults. |
protected java.lang.String[] |
getResourceSuffixes()
Returns
"-context.xml" and "Context.groovy" in order to
support detection of a default XML config file or Groovy script. |
protected void |
loadBeanDefinitions(GenericApplicationContext context,
MergedContextConfiguration mergedConfig)
Load bean definitions into the supplied
context
from the locations in the supplied MergedContextConfiguration using a
GroovyBeanDefinitionReader . |
createBeanDefinitionReader, validateMergedContextConfiguration
customizeBeanFactory, customizeContext, loadContext, loadContext, prepareContext
customizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
protected void loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig)
context
from the locations in the supplied MergedContextConfiguration
using a
GroovyBeanDefinitionReader
.loadBeanDefinitions
in class AbstractGenericContextLoader
context
- the context into which the bean definitions should be loadedmergedConfig
- the merged context configurationAbstractGenericContextLoader.loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext, org.springframework.test.context.MergedContextConfiguration)
protected java.lang.String[] getResourceSuffixes()
"-context.xml" and "Context.groovy"
in order to
support detection of a default XML config file or Groovy script.getResourceSuffixes
in class AbstractContextLoader
null
or emptyAbstractContextLoader.generateDefaultLocations(Class)
protected java.lang.String getResourceSuffix()
GenericGroovyXmlContextLoader
supports both Groovy and XML
resource types for detection of defaults. Consequently, this method
is not supported.getResourceSuffix
in class GenericXmlContextLoader
null
or emptyjava.lang.UnsupportedOperationException
getResourceSuffixes()