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:
- AotContextLoader, 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 SummaryFields inherited from class AbstractGenericWebContextLoaderlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringGenericGroovyXmlWebContextLoadersupports 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 voidloadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfigurationusing aGroovyBeanDefinitionReader.Methods inherited from class GenericXmlWebContextLoadervalidateMergedContextConfigurationMethods inherited from class AbstractGenericWebContextLoaderconfigureWebResources, createContext, customizeBeanFactory, customizeContext, loadContext, loadContext, loadContextForAotProcessing, loadContextForAotProcessing, loadContextForAotRuntimeMethods inherited from class AbstractContextLoadercustomizeContext, generateDefaultLocations, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocationsMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SmartContextLoaderprocessContextConfiguration, processLocations
- 
Constructor Details- 
GenericGroovyXmlWebContextLoaderpublic GenericGroovyXmlWebContextLoader()
 
- 
- 
Method Details- 
loadBeanDefinitionsprotected void loadBeanDefinitions(GenericWebApplicationContext context, WebMergedContextConfiguration webMergedConfig) Load bean definitions into the suppliedcontextfrom the locations in the suppliedWebMergedContextConfigurationusing aGroovyBeanDefinitionReader.- Overrides:
- loadBeanDefinitionsin class- GenericXmlWebContextLoader
- Parameters:
- context- the context into which the bean definitions should be loaded
- webMergedConfig- the merged context configuration
- See Also:
 
- 
getResourceSuffixesReturns"-context.xml" and "Context.groovy"in order to support detection of a default XML config file or Groovy script.- Overrides:
- getResourceSuffixesin class- AbstractContextLoader
- Returns:
- the resource suffixes; never nullor empty
- See Also:
 
- 
getResourceSuffixGenericGroovyXmlWebContextLoadersupports both Groovy and XML resource types for detection of defaults. Consequently, this method is not supported.- Overrides:
- getResourceSuffixin class- GenericXmlWebContextLoader
- Returns:
- the resource suffix; never nullor empty
- Throws:
- UnsupportedOperationException- in this implementation
- See Also:
 
 
-