Class 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
- All Implemented Interfaces:
ContextLoader
,SmartContextLoader
Concrete implementation of
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"
.
- Since:
- 4.1
- Author:
- Sam Brannen
- See Also:
-
Field Summary
Fields inherited from class org.springframework.test.context.web.AbstractGenericWebContextLoader
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
GenericGroovyXmlWebContextLoader
supports both Groovy and XML resource types for detection of defaults.protected String[]
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 suppliedcontext
from the locations in the suppliedWebMergedContextConfiguration
using aGroovyBeanDefinitionReader
.Methods inherited from class org.springframework.test.context.web.GenericXmlWebContextLoader
validateMergedContextConfiguration
Methods inherited from class org.springframework.test.context.web.AbstractGenericWebContextLoader
configureWebResources, customizeBeanFactory, customizeContext, loadContext, loadContext
Methods inherited from class org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
-
Constructor Details
-
GenericGroovyXmlWebContextLoader
public GenericGroovyXmlWebContextLoader()
-
-
Method Details
-
loadBeanDefinitions
protected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) Load bean definitions into the suppliedcontext
from the locations in the suppliedWebMergedContextConfiguration
using aGroovyBeanDefinitionReader
.- Overrides:
loadBeanDefinitions
in classGenericXmlWebContextLoader
- Parameters:
context
- the context into which the bean definitions should be loadedwebMergedConfig
- the merged context configuration- See Also:
-
getResourceSuffixes
Returns"-context.xml" and "Context.groovy"
in order to support detection of a default XML config file or Groovy script.- Overrides:
getResourceSuffixes
in classAbstractContextLoader
- Returns:
- the resource suffixes; never
null
or empty - See Also:
-
getResourceSuffix
GenericGroovyXmlWebContextLoader
supports both Groovy and XML resource types for detection of defaults. Consequently, this method is not supported.- Overrides:
getResourceSuffix
in classGenericXmlWebContextLoader
- Returns:
- the resource suffix; never
null
or empty - Throws:
UnsupportedOperationException
- in this implementation- See Also:
-