@FunctionalInterface public interface ContextCustomizer
application contexts that are created and managed by the Spring
TestContext Framework.
Customizers are created by ContextCustomizerFactory implementations.
Implementations must implement correct equals and hashCode
methods since customizers form part of the MergedContextConfiguration
which is used as a cache key.
ContextCustomizerFactory,
AbstractContextLoader.customizeContext(org.springframework.context.ConfigurableApplicationContext, org.springframework.test.context.MergedContextConfiguration)| Modifier and Type | Method and Description |
|---|---|
void |
customizeContext(ConfigurableApplicationContext context,
MergedContextConfiguration mergedConfig)
Customize the supplied
ConfigurableApplicationContext after
bean definitions have been loaded into the context but before the
context has been refreshed. |
void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)
ConfigurableApplicationContext after
bean definitions have been loaded into the context but before the
context has been refreshed.context - the context to customizemergedConfig - the merged context configuration