Package org.springframework.test.context
Interface ContextCustomizerFactory
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.- Since:
- 4.3
- Author:
- Phillip Webb, Sam Brannen
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContextCustomizercreateContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)Create aContextCustomizerthat should be used to customize aConfigurableApplicationContextbefore it is refreshed.
Method Detail
createContextCustomizer
ContextCustomizer createContextCustomizer(Class<?> testClass, List<ContextConfigurationAttributes> configAttributes)
Create aContextCustomizerthat should be used to customize aConfigurableApplicationContextbefore it is refreshed.- Parameters:
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- Returns:
- a
ContextCustomizerornullif no customizer should be used