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 ofAbstractGenericContextLoaderthat reads bean definitions from JavaPropertiesresources.- 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 BeanDefinitionReadercreateBeanDefinitionReader(GenericApplicationContext context)Creates a newPropertiesBeanDefinitionReader.protected StringgetResourceSuffix()Returns "-context.properties".protected voidvalidateMergedContextConfiguration(MergedContextConfiguration mergedConfig)Ensure that the suppliedMergedContextConfigurationdoes 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:
createBeanDefinitionReaderin classAbstractGenericContextLoader- Parameters:
context- the context for which theBeanDefinitionReadershould be created- Returns:
- a new PropertiesBeanDefinitionReader
- See Also:
PropertiesBeanDefinitionReader
getResourceSuffix
protected String getResourceSuffix()
Returns "-context.properties".- Specified by:
getResourceSuffixin classAbstractContextLoader- Returns:
- the resource suffix; never
nullor empty - See Also:
AbstractContextLoader.generateDefaultLocations(Class),AbstractContextLoader.getResourceSuffixes()
validateMergedContextConfiguration
protected void validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)
Ensure that the suppliedMergedContextConfigurationdoes not containclasses.- Overrides:
validateMergedContextConfigurationin classAbstractGenericContextLoader- Parameters:
mergedConfig- the merged configuration to validate- Since:
- 4.0.4
- See Also:
AbstractGenericContextLoader.validateMergedContextConfiguration(org.springframework.test.context.MergedContextConfiguration)