クラス WebMergedContextConfiguration
- 実装されているすべてのインターフェース:
SerializableSE
WebMergedContextConfiguration は、テストクラスとそのすべてのスーパークラス、および @ContextConfiguration、@WebAppConfiguration、@ActiveProfiles、@TestPropertySource を含むクラスで宣言されたマージされたコンテキスト構成をカプセル化します。WebMergedContextConfiguration は、@WebAppConfiguration を介して構成されたリソースベースパスのサポートを追加することにより、MergedContextConfiguration の契約を継承します。これにより、ContextCache は、この WebMergedContextConfiguration のプロパティを使用してロードされた対応する WebApplicationContext を適切にキャッシュできます。
コンストラクターの概要
コンストラクターコンストラクター説明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インスタンスを作成します。WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, StringSE resourceBasePath) 提供されたMergedContextConfigurationからすべてのプロパティをコピーして、新しいWebMergedContextConfigurationインスタンスを作成します。方法の概要
修飾子と型メソッド説明boolean指定されたオブジェクトがこのWebMergedContextConfigurationインスタンスと等しいかどうかを確認するには、両方のオブジェクトの場所、アノテーション付きクラス、コンテキスト初期化クラス、アクティブプロファイル、リソースベースパス、親、およびContextLoadersの完全修飾名を比較します。@WebAppConfigurationを介して構成された、テストクラスの Web アプリケーションのルートディレクトリへのリソースパスを取得します。inthashCode()テストクラスを除く、このWebMergedContextConfigurationのすべてのプロパティに対して一意のハッシュコードを生成します。toString()テストクラス、場所、アノテーション付きクラス、コンテキスト初期化子クラス、アクティブプロファイル、プロパティソースの場所、プロパティソースプロパティ、コンテキストカスタマイザ、リソースベースパス、ContextLoaderの名前、親構成の String 表現を提供します。クラス org.springframework.test.context.MergedContextConfiguration から継承されたメソッド
getActiveProfiles, getClasses, getContextCustomizers, getContextInitializerClasses, getContextLoader, getLocations, getParent, getParentApplicationContext, getPropertySourceLocations, getPropertySourceProperties, getTestClass, hasClasses, hasLocations, hasResources, nullSafeClassName
コンストラクターの詳細
WebMergedContextConfiguration
public WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, StringSE resourceBasePath) 提供されたMergedContextConfigurationからすべてのプロパティをコピーして、新しいWebMergedContextConfigurationインスタンスを作成します。resourceBasePathに空の値を指定すると、空の文字列が使用されます。- パラメーター:
resourceBasePath- Web アプリケーションのルートディレクトリへのリソースパス- 導入:
- 4.1
WebMergedContextConfiguration
public WebMergedContextConfiguration(ClassSE<?> testClass, @Nullable StringSE[] locations, @Nullable ClassSE<?>[] classes, @Nullable SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, @Nullable StringSE[] activeProfiles, @Nullable StringSE[] propertySourceLocations, @Nullable StringSE[] propertySourceProperties, StringSE resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, @Nullable MergedContextConfiguration parent) 指定されたパラメーターの新しいWebMergedContextConfigurationインスタンスを作成します。locations、classes、activeProfiles、propertySourceLocationsまたはpropertySourcePropertiesにnull値が指定されている場合は、代わりに空の配列が格納されます。contextInitializerClassesにnull値が指定されている場合は、代わりに空のセットが保存されます。resourceBasePathに空の値を指定すると、空の文字列が使用されます。さらに、アクティブなプロファイルがソートされ、重複するプロファイルが削除されます。- パラメーター:
testClass- 構成がマージされたテストクラスlocations- マージされたリソースの場所classes- マージされたアノテーション付きクラスcontextInitializerClasses- マージされたコンテキスト初期化子クラスactiveProfiles- マージされたアクティブな Bean 定義プロファイルpropertySourceLocations- マージされたPropertySourceロケーションpropertySourceProperties- マージされたPropertySourceプロパティresourceBasePath- Web アプリケーションのルートディレクトリへのリソースパスcontextLoader- 解決されたContextLoadercacheAwareContextLoaderDelegate- 親コンテキストを取得するためのキャッシュ対応コンテキストローダーデリゲートparent- 親構成、または親がない場合はnull- 導入:
- 4.1
WebMergedContextConfiguration
public WebMergedContextConfiguration(ClassSE<?> testClass, @Nullable StringSE[] locations, @Nullable ClassSE<?>[] classes, @Nullable SetSE<ClassSE<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, @Nullable StringSE[] activeProfiles, @Nullable StringSE[] propertySourceLocations, @Nullable StringSE[] propertySourceProperties, @Nullable SetSE<ContextCustomizer> contextCustomizers, StringSE resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, @Nullable MergedContextConfiguration parent) 指定されたパラメーターの新しいWebMergedContextConfigurationインスタンスを作成します。locations、classes、activeProfiles、propertySourceLocationsまたはpropertySourcePropertiesにnull値が指定されている場合は、代わりに空の配列が格納されます。contextInitializerClassesまたはcontextCustomizersにnull値が指定されている場合は、代わりに空のセットが格納されます。resourceBasePathに空の値を指定すると、空の文字列が使用されます。さらに、アクティブなプロファイルがソートされ、重複するプロファイルが削除されます。- パラメーター:
testClass- 構成がマージされたテストクラスlocations- マージされたコンテキストリソースの場所classes- マージされたアノテーション付きクラスcontextInitializerClasses- マージされたコンテキスト初期化子クラスactiveProfiles- マージされたアクティブな Bean 定義プロファイルpropertySourceLocations- マージされたPropertySourceロケーションpropertySourceProperties- マージされたPropertySourceプロパティcontextCustomizers- コンテキストカスタマイザresourceBasePath- Web アプリケーションのルートディレクトリへのリソースパスcontextLoader- 解決されたContextLoadercacheAwareContextLoaderDelegate- 親コンテキストを取得するためのキャッシュ対応コンテキストローダーデリゲートparent- 親構成、または親がない場合はnull- 導入:
- 4.3
メソッドの詳細
getResourceBasePath
@WebAppConfigurationを介して構成された、テストクラスの Web アプリケーションのルートディレクトリへのリソースパスを取得します。- 関連事項:
equals
指定されたオブジェクトがこのWebMergedContextConfigurationインスタンスと等しいかどうかを確認するには、両方のオブジェクトの場所、アノテーション付きクラス、コンテキスト初期化クラス、アクティブプロファイル、リソースベースパス、親、およびContextLoadersの完全修飾名を比較します。- オーバーライド:
- クラス
MergedContextConfigurationのequals
hashCode
public int hashCode()テストクラスを除く、このWebMergedContextConfigurationのすべてのプロパティに対して一意のハッシュコードを生成します。- オーバーライド:
- クラス
MergedContextConfigurationのhashCode
toString
テストクラス、場所、アノテーション付きクラス、コンテキスト初期化子クラス、アクティブプロファイル、プロパティソースの場所、プロパティソースプロパティ、コンテキストカスタマイザ、リソースベースパス、ContextLoaderの名前、親構成の String 表現を提供します。- オーバーライド:
- クラス
MergedContextConfigurationのtoString