接口 ContextCustomizer
public interface ContextCustomizer
Strategy interface for customizingapplication contexts
that are created and managed by the Spring TestContext Framework.Customizers are created by
ContextCustomizerFactory
implementations.Implementations must implement correct
equals
andhashCode
methods since customizers form part of theMergedContextConfiguration
which is used as a cache key.- 从以下版本开始:
- 4.3
- 作者:
- Phillip Webb, Sam Brannen
- 另请参阅:
ContextCustomizerFactory
,AbstractContextLoader.customizeContext(org.springframework.context.ConfigurableApplicationContext, org.springframework.test.context.MergedContextConfiguration)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 void
customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)
Customize the suppliedConfigurableApplicationContext
after bean definitions have been loaded into the context but before the context has been refreshed.
方法详细资料
customizeContext
void customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)
Customize the suppliedConfigurableApplicationContext
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