接口 ContextCustomizerFactory
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ContextCustomizerFactory
Factory for creatingContextCustomizers.Factories are invoked after
ContextLoadershave processed context configuration attributes but before theMergedContextConfigurationis created.By default, the Spring TestContext Framework will use the
SpringFactoriesLoadermechanism for loading factories configured in allMETA-INF/spring.factoriesfiles on the classpath.- 从以下版本开始:
- 4.3
- 作者:
- Phillip Webb, Sam Brannen
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ContextCustomizercreateContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)Create aContextCustomizerthat should be used to customize aConfigurableApplicationContextbefore it is refreshed.
方法详细资料
createContextCustomizer
@Nullable ContextCustomizer createContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)
Create aContextCustomizerthat should be used to customize aConfigurableApplicationContextbefore 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); nevernullor empty- 返回:
- a
ContextCustomizerornullif no customizer should be used