接口 ContextCustomizerFactory
public interface ContextCustomizerFactory
Factory for creatingContextCustomizers
.Factories are invoked after
ContextLoaders
have processed context configuration attributes but before theMergedContextConfiguration
is created.By default, the Spring TestContext Framework will use the
SpringFactoriesLoader
mechanism for loading factories configured in allMETA-INF/spring.factories
files on the classpath.- 从以下版本开始:
- 4.3
- 作者:
- Phillip Webb, Sam Brannen
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ContextCustomizer
createContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)
Create aContextCustomizer
that should be used to customize aConfigurableApplicationContext
before it is refreshed.
方法详细资料
createContextCustomizer
ContextCustomizer createContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)
Create aContextCustomizer
that should be used to customize aConfigurableApplicationContext
before it is refreshed.- 参数:
testClass
- the test classconfigAttributes
- the list of context configuration attributes for the test class, ordered bottom-up (i.e., as if we were traversing up the class hierarchy); nevernull
or empty- 返回:
- a
ContextCustomizer
ornull
if no customizer should be used