インターフェースの使用
org.springframework.test.context.ContextLoader
ContextLoader を使用するパッケージ
パッケージ
説明
このパッケージには Spring TestContext フレームワークが含まれており、使用中の実際のテストフレームワークにとらわれないアノテーション駆動型ユニットおよび統合テストのサポートを提供します。
Spring TestContext フレームワークの事前 (AOT) サポート。
Spring TestContext フレームワークのサポートクラス。
Web は、Spring TestContext フレームワークのクラスをサポートします。
org.springframework.test.context 内の ContextLoader 使用
org.springframework.test.context 内の ContextLoader サブインターフェース修飾子と型インターフェース説明interface
Spring TestContext フレームワークによって管理される統合テストのためにApplicationContext
をロードするための戦略インターフェース。型 ContextLoader の引数を持つ型を返す org.springframework.test.context のメソッド修飾子と型メソッド説明ClassSE<? extends ContextLoader>
ContextConfigurationAttributes.getContextLoaderClass()
@ContextConfiguration
を介して宣言されたContextLoader
クラスを取得します。型 ContextLoader のパラメーターを持つ org.springframework.test.context のメソッド修飾子と型メソッド説明protected static StringSE
MergedContextConfiguration.nullSafeClassName
(ContextLoader contextLoader) 型 ContextLoader のパラメーターを持つ org.springframework.test.context のコンストラクター修飾子コンストラクター説明MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, StringSE[] activeProfiles, ContextLoader contextLoader) 指定されたパラメーターの新しいMergedContextConfiguration
インスタンスを作成します。MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, StringSE[] propertySourceLocations, StringSE[] propertySourceProperties, SetSE<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) 使用すべきではありません。MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, StringSE[] propertySourceLocations, StringSE[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, ListSE<PropertySourceDescriptor> propertySourceDescriptors, StringSE[] propertySourceProperties, SetSE<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) 指定されたパラメーターの新しいMergedContextConfiguration
インスタンスを作成します。MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, ContextLoader contextLoader) 指定されたパラメーターの新しいMergedContextConfiguration
インスタンスを作成します。MergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) 指定されたパラメーターの新しいMergedContextConfiguration
インスタンスを作成します。org.springframework.test.context.aot 内の ContextLoader 使用
org.springframework.test.context.aot 内の ContextLoader サブインターフェース修飾子と型インターフェース説明interface
ビルド時の AOT 処理用のApplicationContext
と、Spring TestContext フレームワークによって管理される統合テスト用の実行時の AOT 実行をロードするための戦略インターフェース。org.springframework.test.context.support 内の ContextLoader 使用
ContextLoader を実装している org.springframework.test.context.support のクラス修飾子と型クラス説明class
ContextLoader
SPI のすべての具体的な実装の基礎を提供する抽象アプリケーションコンテキストローダー。class
AbstractDelegatingSmartContextLoader
は、SmartContextLoader
SPI の実装の抽象基本クラスとして機能し、一連の候補 SmartContextLoaders(つまり、XML 構成ファイルまたは Groovy スクリプトをサポートするものと、アノテーション付きクラスをサポートするもの)に委譲して、特定のコンテキストローダーが適切かどうかを判断します。テストクラスの構成。class
GenericApplicationContext
をロードするAbstractContextLoader
の抽象、汎用拡張。class
コンポーネントクラスから Bean 定義をロードするAbstractGenericContextLoader
の具象実装。class
DelegatingSmartContextLoader
は、GenericXmlContextLoader
(または Groovy がクラスパスに存在する場合はGenericGroovyXmlContextLoader
)およびAnnotationConfigContextLoader
に委譲するAbstractDelegatingSmartContextLoader
の具象実装です。class
Groovy スクリプトおよび XML 構成ファイルから Bean 定義を読み取るAbstractGenericContextLoader
の具体的な実装。class
XML リソースから Bean 定義を読み取るAbstractGenericContextLoader
の具体的な実装。修飾子と型メソッド説明protected ContextLoader
AbstractTestContextBootstrapper.resolveContextLoader
(ClassSE<?> testClass, ListSE<ContextConfigurationAttributes> configAttributesList) ContextConfigurationAttributes
の提供されたリストに使用するContextLoader
SE クラスを解決してから、そのContextLoader
をインスタンス化して返します。型 ContextLoader の引数を持つ型を返す org.springframework.test.context.support のメソッド修飾子と型メソッド説明protected abstract ClassSE<? extends ContextLoader>
AbstractTestContextBootstrapper.getDefaultContextLoaderClass
(ClassSE<?> testClass) 提供されたテストクラスに使用するデフォルトのContextLoader
クラスを決定SEします。protected ClassSE<? extends ContextLoader>
DefaultTestContextBootstrapper.getDefaultContextLoaderClass
(ClassSE<?> testClass) DelegatingSmartContextLoader
を返します。protected ClassSE<? extends ContextLoader>
AbstractTestContextBootstrapper.resolveExplicitContextLoaderClass
(ListSE<ContextConfigurationAttributes> configAttributesList) org.springframework.test.context.web 内の ContextLoader 使用
ContextLoader を実装している org.springframework.test.context.web のクラス修飾子と型クラス説明class
GenericWebApplicationContext
をロードするAbstractContextLoader
の抽象、汎用拡張。class
アノテーション付きクラスから Bean 定義をロードするAbstractGenericWebContextLoader
の具体的な実装。class
Groovy スクリプトおよび XML 構成ファイルから Bean 定義をロードするAbstractGenericWebContextLoader
の具体的な実装。class
XML リソースから Bean 定義をロードするAbstractGenericWebContextLoader
の具体的な実装。class
WebDelegatingSmartContextLoader
は、GenericXmlWebContextLoader
(または Groovy がクラスパスに存在する場合はGenericGroovyXmlWebContextLoader
)およびAnnotationConfigWebContextLoader
に委譲するAbstractDelegatingSmartContextLoader
の具象実装です。型 ContextLoader の引数を持つ型を返す org.springframework.test.context.web のメソッド修飾子と型メソッド説明protected ClassSE<? extends ContextLoader>
WebTestContextBootstrapper.getDefaultContextLoaderClass
(ClassSE<?> testClass) 指定されたクラスに@WebAppConfiguration
アノテーションが付けられている場合はWebDelegatingSmartContextLoader
を返し、そうでない場合はスーパークラスに委譲します。型 ContextLoader のパラメーターを持つ org.springframework.test.context.web のコンストラクター修飾子コンストラクター説明WebMergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, StringSE[] propertySourceLocations, StringSE[] propertySourceProperties, StringSE resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) WebMergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, StringSE[] propertySourceLocations, StringSE[] propertySourceProperties, SetSE<ContextCustomizer> contextCustomizers, StringSE resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) WebMergedContextConfiguration
(ClassSE<?> testClass, StringSE[] locations, ClassSE<?>[] classes, SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, StringSE[] activeProfiles, ListSE<PropertySourceDescriptor> propertySourceDescriptors, StringSE[] propertySourceProperties, SetSE<ContextCustomizer> contextCustomizers, StringSE resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) 指定されたパラメーターの新しいWebMergedContextConfiguration
インスタンスを作成します。
MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
を推奨