Package org.springframework.test.context
Interface ContextCustomizer
public interface ContextCustomizer
Strategy interface for customizingapplication contextsthat are created and managed by the Spring TestContext Framework.Customizers are created by
ContextCustomizerFactoryimplementations.Implementations must implement correct
equalsandhashCodemethods since customizers form part of theMergedContextConfigurationwhich is used as a cache key.- Since:
- 4.3
- Author:
- Phillip Webb, Sam Brannen
- See Also:
ContextCustomizerFactory,AbstractContextLoader.customizeContext(org.springframework.context.ConfigurableApplicationContext, org.springframework.test.context.MergedContextConfiguration)
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcustomizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)Customize the suppliedConfigurableApplicationContextafter bean definitions have been loaded into the context but before the context has been refreshed.
Method Detail
customizeContext
void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)
Customize the suppliedConfigurableApplicationContextafter bean definitions have been loaded into the context but before the context has been refreshed.- Parameters:
context- the context to customizemergedConfig- the merged context configuration