public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
AbstractGenericWebContextLoader
that loads
bean definitions from Groovy scripts and XML configuration files.
Default resource locations are detected using the suffixes
"-context.xml"
and "Context.groovy"
.
GroovyBeanDefinitionReader
,
GenericXmlWebContextLoader
,
AnnotationConfigWebContextLoader
logger
Constructor and Description |
---|
GenericGroovyXmlWebContextLoader() |
Modifier and Type | Method and Description |
---|---|
protected String |
getResourceSuffix()
GenericGroovyXmlWebContextLoader supports 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 void |
loadBeanDefinitions(GenericWebApplicationContext context,
WebMergedContextConfiguration webMergedConfig)
Load bean definitions into the supplied
context
from the locations in the supplied WebMergedContextConfiguration using a
GroovyBeanDefinitionReader . |
validateMergedContextConfiguration
configureWebResources, customizeBeanFactory, customizeContext, loadContext, loadContext
customizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig)
context
from the locations in the supplied WebMergedContextConfiguration
using a
GroovyBeanDefinitionReader
.loadBeanDefinitions
in class GenericXmlWebContextLoader
context
- the context into which the bean definitions should be loadedwebMergedConfig
- the merged context configurationAbstractGenericWebContextLoader.loadBeanDefinitions(org.springframework.web.context.support.GenericWebApplicationContext, org.springframework.test.context.web.WebMergedContextConfiguration)
protected 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 String getResourceSuffix()
GenericGroovyXmlWebContextLoader
supports both Groovy and XML
resource types for detection of defaults. Consequently, this method
is not supported.getResourceSuffix
in class GenericXmlWebContextLoader
null
or emptyUnsupportedOperationException
getResourceSuffixes()