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