インターフェースの使用
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 サブインターフェース修飾子と型インターフェース説明interfaceSpring TestContext フレームワークによって管理される統合テストのためにApplicationContextをロードするための戦略インターフェース。型 ContextLoader の引数を持つ型を返す org.springframework.test.context のメソッド修飾子と型メソッド説明ClassSE<? extends ContextLoader>ContextConfigurationAttributes.getContextLoaderClass()@ContextConfigurationを介して宣言されたContextLoaderクラスを取得します。型 ContextLoader のパラメーターを持つ org.springframework.test.context のメソッド修飾子と型メソッド説明protected static StringSEMergedContextConfiguration.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インスタンスを作成します。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インスタンスを作成します。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 のクラス修飾子と型クラス説明classContextLoaderSPI のすべての具体的な実装の基礎を提供する抽象アプリケーションコンテキストローダー。classAbstractDelegatingSmartContextLoaderは、SmartContextLoaderSPI の実装の抽象基本クラスとして機能し、一連の候補 SmartContextLoaders(つまり、XML 構成ファイルまたは Groovy スクリプトをサポートするものと、アノテーション付きクラスをサポートするもの)に委譲して、特定のコンテキストローダーが適切かどうかを判断します。テストクラスの構成。classGenericApplicationContextをロードするAbstractContextLoaderの抽象、汎用拡張。classコンポーネントクラスから Bean 定義をロードするAbstractGenericContextLoaderの具象実装。classDelegatingSmartContextLoaderは、GenericXmlContextLoader(または Groovy がクラスパスに存在する場合はGenericGroovyXmlContextLoader)およびAnnotationConfigContextLoaderに委譲するAbstractDelegatingSmartContextLoaderの具象実装です。classGroovy スクリプトおよび XML 構成ファイルから Bean 定義を読み取るAbstractGenericContextLoaderの具体的な実装。classXML リソースから Bean 定義を読み取るAbstractGenericContextLoaderの具体的な実装。修飾子と型メソッド説明protected ContextLoaderAbstractTestContextBootstrapper.resolveContextLoader(ClassSE<?> testClass, ListSE<ContextConfigurationAttributes> configAttributesList) ContextConfigurationAttributesの提供されたリストに使用するContextLoaderSE クラスを解決してから、その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 のクラス修飾子と型クラス説明classGenericWebApplicationContextをロードするAbstractContextLoaderの抽象、汎用拡張。classアノテーション付きクラスから Bean 定義をロードするAbstractGenericWebContextLoaderの具体的な実装。classGroovy スクリプトおよび XML 構成ファイルから Bean 定義をロードするAbstractGenericWebContextLoaderの具体的な実装。classXML リソースから Bean 定義をロードするAbstractGenericWebContextLoaderの具体的な実装。classWebDelegatingSmartContextLoaderは、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インスタンスを作成します。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インスタンスを作成します。