@FunctionalInterface
public interface ContextCustomizerFactory
ContextCustomizers
を作成するためのファクトリ。 ファクトリは、ContextLoaders
がコンテキスト構成属性を処理した後で、MergedContextConfiguration
が作成される前に呼び出されます。
デフォルトでは、Spring TestContext フレームワークは SpringFactoriesLoader
メカニズムを使用して、クラスパス上のすべての META-INF/spring.factories
ファイルで構成されたファクトリをロードします。
修飾子と型 | メソッドと説明 |
---|---|
ContextCustomizer | createContextCustomizer(java.lang.Class<?> testClass, java.util.List<ContextConfigurationAttributes> configAttributes) ConfigurableApplicationContext をリフレッシュする前にカスタマイズするために使用する ContextCustomizer を作成します。 |
@Nullable ContextCustomizer createContextCustomizer(java.lang.Class<?> testClass, java.util.List<ContextConfigurationAttributes> configAttributes)
ConfigurableApplicationContext
をリフレッシュする前にカスタマイズするために使用する ContextCustomizer
を作成します。testClass
- テストクラス configAttributes
- テストクラスのコンテキスト構成属性のリスト。ボトムアップで並べ替えられます(つまり、クラス階層を上に向かっているかのように)。null
または空になることはありません ContextCustomizer
または null