Class GenericPropertiesContextLoader
- java.lang.Object
- org.springframework.test.context.support.AbstractContextLoader
- org.springframework.test.context.support.AbstractGenericContextLoader
- org.springframework.test.context.support.GenericPropertiesContextLoader
- All Implemented Interfaces:
ContextLoader
,SmartContextLoader
public class GenericPropertiesContextLoader extends AbstractGenericContextLoader
Concrete implementation ofAbstractGenericContextLoader
that reads bean definitions from JavaProperties
resources.- Since:
- 2.5
- Author:
- Sam Brannen
Field Summary
Fields inherited from class org.springframework.test.context.support.AbstractGenericContextLoader
logger
Constructor Summary
Constructors Constructor Description GenericPropertiesContextLoader()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BeanDefinitionReader
createBeanDefinitionReader(GenericApplicationContext context)
Creates a newPropertiesBeanDefinitionReader
.protected String
getResourceSuffix()
Returns "-context.properties
".protected void
validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Ensure that the suppliedMergedContextConfiguration
does not containclasses
.Methods inherited from class org.springframework.test.context.support.AbstractGenericContextLoader
customizeBeanFactory, customizeContext, loadBeanDefinitions, loadContext, loadContext, prepareContext
Methods inherited from class org.springframework.test.context.support.AbstractContextLoader
customizeContext, generateDefaultLocations, getResourceSuffixes, isGenerateDefaultLocations, modifyLocations, prepareContext, processContextConfiguration, processLocations
Constructor Detail
GenericPropertiesContextLoader
public GenericPropertiesContextLoader()
Method Detail
createBeanDefinitionReader
protected BeanDefinitionReader createBeanDefinitionReader(GenericApplicationContext context)
Creates a newPropertiesBeanDefinitionReader
.- Specified by:
createBeanDefinitionReader
in classAbstractGenericContextLoader
- Parameters:
context
- the context for which theBeanDefinitionReader
should be created- Returns:
- a new PropertiesBeanDefinitionReader
- See Also:
PropertiesBeanDefinitionReader
getResourceSuffix
protected String getResourceSuffix()
Returns "-context.properties
".- Specified by:
getResourceSuffix
in classAbstractContextLoader
- Returns:
- the resource suffix; never
null
or empty - See Also:
AbstractContextLoader.generateDefaultLocations(Class)
,AbstractContextLoader.getResourceSuffixes()
validateMergedContextConfiguration
protected void validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Ensure that the suppliedMergedContextConfiguration
does not containclasses
.- Overrides:
validateMergedContextConfiguration
in classAbstractGenericContextLoader
- Parameters:
mergedConfig
- the merged configuration to validate- Since:
- 4.0.4
- See Also:
AbstractGenericContextLoader.validateMergedContextConfiguration(org.springframework.test.context.MergedContextConfiguration)