public interface ContextCustomizerFactory
ContextCustomizers
.
Factories are invoked after ContextLoaders
have
processed context configuration attributes but before the
MergedContextConfiguration
is created.
By default, the Spring TestContext Framework will use the
SpringFactoriesLoader
mechanism for loading factories configured in all META-INF/spring.factories
files on the classpath.
Modifier and Type | Method and Description |
---|---|
ContextCustomizer |
createContextCustomizer(java.lang.Class<?> testClass,
java.util.List<ContextConfigurationAttributes> configAttributes)
Create a
ContextCustomizer that should be used to customize a
ConfigurableApplicationContext
before it is refreshed. |
ContextCustomizer createContextCustomizer(java.lang.Class<?> testClass, java.util.List<ContextConfigurationAttributes> configAttributes)
ContextCustomizer
that should be used to customize a
ConfigurableApplicationContext
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); never null
or emptyContextCustomizer
or null
if no customizer should
be used