# Uses of Class
org.springframework.test.context.MergedContextConfiguration

Packages that use MergedContextConfiguration
Package
Description
org.springframework.test.context
This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.
org.springframework.test.context.aot
Ahead-of-time (AOT) support for the Spring TestContext Framework.
org.springframework.test.context.cache
Support for context caching within the Spring TestContext Framework.
org.springframework.test.context.support
Support classes for the Spring TestContext Framework.
org.springframework.test.context.web
Web support classes for the Spring TestContext Framework.

## Uses of MergedContextConfiguration in org.springframework.test.context

Methods in org.springframework.test.context that return MergedContextConfiguration
Modifier and Type
Method
Description
`MergedContextConfiguration`
TestContextBootstrapper.`buildMergedContextConfiguration()`
Build the merged context configuration for the test class in the `BootstrapContext` associated with this bootstrapper.
`MergedContextConfiguration`
MergedContextConfiguration.`getParent()`
Get the `MergedContextConfiguration` for the parent application context in a context hierarchy.
Methods in org.springframework.test.context with parameters of type MergedContextConfiguration
Modifier and Type
Method
Description
`void`
CacheAwareContextLoaderDelegate.`closeContext(MergedContextConfiguration mergedConfig, DirtiesContext.HierarchyMode hierarchyMode)`
Remove the application context for the supplied `MergedContextConfiguration` from the `ContextCache` and close it if it is an instance of `ConfigurableApplicationContext`.
`void`
ContextCustomizer.`customizeContext(org.springframework.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)`
Customize the supplied `ConfigurableApplicationContext` after bean definitions have been loaded into the context but before the context has been refreshed.
`default boolean`
CacheAwareContextLoaderDelegate.`isContextLoaded(MergedContextConfiguration mergedConfig)`
Determine if the application context for the supplied `MergedContextConfiguration` has been loaded (i.e., is present in the `ContextCache`).
`org.springframework.context.ApplicationContext`
CacheAwareContextLoaderDelegate.`loadContext(MergedContextConfiguration mergedConfig)`
Load the application context for the supplied `MergedContextConfiguration` by delegating to the `ContextLoader` configured in the given `MergedContextConfiguration`.
`org.springframework.context.ApplicationContext`
SmartContextLoader.`loadContext(MergedContextConfiguration mergedConfig)`
Load a new `ApplicationContext` based on the supplied `MergedContextConfiguration`, configure the context, and return the context in a fully refreshed state.
Constructors in org.springframework.test.context with parameters of type MergedContextConfiguration
Modifier
Constructor
Description
``
`MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Deprecated.
since 6.1 in favor of `MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)`
``
`MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Deprecated.
since 6.1 in favor of `MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)`
``
`MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, List<org.springframework.core.io.support.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Create a new `MergedContextConfiguration` instance for the supplied parameters.
``
`MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Create a new `MergedContextConfiguration` instance for the supplied parameters.
``
`MergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Create a new `MergedContextConfiguration` instance by copying all fields from the supplied `MergedContextConfiguration`.

## Uses of MergedContextConfiguration in org.springframework.test.context.aot

Methods in org.springframework.test.context.aot with parameters of type MergedContextConfiguration
Modifier and Type
Method
Description
`default org.springframework.context.ApplicationContext`
AotContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig)`
Deprecated, for removal: This API element is subject to removal in a future version.
as of Spring Framework 6.2.4, in favor of `AotContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints)`; to be removed in Spring Framework 8.0
`default org.springframework.context.ApplicationContext`
AotContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig, org.springframework.aot.hint.RuntimeHints runtimeHints)`
Load a new `ApplicationContext` for AOT build-time processing based on the supplied `MergedContextConfiguration`, configure the context, and return the context.
`org.springframework.context.ApplicationContext`
AotContextLoader.`loadContextForAotRuntime(MergedContextConfiguration mergedConfig, org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer)`
Load a new `ApplicationContext` for AOT run-time execution based on the supplied `MergedContextConfiguration` and `ApplicationContextInitializer`.

## Uses of MergedContextConfiguration in org.springframework.test.context.cache

Methods in org.springframework.test.context.cache with parameters of type MergedContextConfiguration
Modifier and Type
Method
Description
`void`
DefaultCacheAwareContextLoaderDelegate.`closeContext(MergedContextConfiguration mergedConfig, DirtiesContext.HierarchyMode hierarchyMode)`
`boolean`
ContextCache.`contains(MergedContextConfiguration key)`
Determine whether there is a cached context for the given key.
`boolean`
DefaultContextCache.`contains(MergedContextConfiguration key)`
`org.springframework.context.ApplicationContext`
ContextCache.`get(MergedContextConfiguration key)`
Obtain a cached `ApplicationContext` for the given key.
`org.springframework.context.ApplicationContext`
DefaultContextCache.`get(MergedContextConfiguration key)`
`default int`
ContextCache.`getFailureCount(MergedContextConfiguration key)`
Get the failure count for the given key.
`int`
DefaultContextCache.`getFailureCount(MergedContextConfiguration key)`
`default void`
ContextCache.`incrementFailureCount(MergedContextConfiguration key)`
Increment the failure count for the given key.
`void`
DefaultContextCache.`incrementFailureCount(MergedContextConfiguration key)`
`boolean`
DefaultCacheAwareContextLoaderDelegate.`isContextLoaded(MergedContextConfiguration mergedConfig)`
`org.springframework.context.ApplicationContext`
DefaultCacheAwareContextLoaderDelegate.`loadContext(MergedContextConfiguration mergedConfig)`
`protected org.springframework.context.ApplicationContext`
DefaultCacheAwareContextLoaderDelegate.`loadContextInternal(MergedContextConfiguration mergedConfig)`
Load the `ApplicationContext` for the supplied merged context configuration.
`void`
ContextCache.`put(MergedContextConfiguration key, org.springframework.context.ApplicationContext context)`
Explicitly add an `ApplicationContext` instance to the cache under the given key, potentially honoring a custom eviction policy.
`void`
DefaultContextCache.`put(MergedContextConfiguration key, org.springframework.context.ApplicationContext context)`
`void`
ContextCache.`remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode)`
Remove the context with the given key from the cache and explicitly close it if it is an instance of `ConfigurableApplicationContext`.
`void`
DefaultContextCache.`remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode)`

## Uses of MergedContextConfiguration in org.springframework.test.context.support

Methods in org.springframework.test.context.support that return MergedContextConfiguration
Modifier and Type
Method
Description
`final MergedContextConfiguration`
AbstractTestContextBootstrapper.`buildMergedContextConfiguration()`
`protected MergedContextConfiguration`
AbstractTestContextBootstrapper.`processMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Process the supplied, newly instantiated `MergedContextConfiguration` instance.
Methods in org.springframework.test.context.support with parameters of type MergedContextConfiguration
Modifier and Type
Method
Description
`protected void`
AbstractContextLoader.`customizeContext(org.springframework.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)`
Customize the `ConfigurableApplicationContext` created by this `ContextLoader` after bean definitions have been loaded into the context but before the context has been refreshed.
`protected void`
AbstractGenericContextLoader.`loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext context, MergedContextConfiguration mergedConfig)`
Load bean definitions into the supplied `context` from the locations or classes in the supplied `MergedContextConfiguration`.
`protected void`
AnnotationConfigContextLoader.`loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext context, MergedContextConfiguration mergedConfig)`
Register classes in the supplied `context` from the classes in the supplied `MergedContextConfiguration`.
`protected void`
GenericGroovyXmlContextLoader.`loadBeanDefinitions(org.springframework.context.support.GenericApplicationContext context, MergedContextConfiguration mergedConfig)`
Load bean definitions into the supplied `context` from the locations in the supplied `MergedContextConfiguration` using a `GroovyBeanDefinitionReader`.
`final org.springframework.context.ApplicationContext`
AbstractDelegatingSmartContextLoader.`loadContext(MergedContextConfiguration mergedConfig)`
Delegates to an appropriate candidate `SmartContextLoader` to load an `ApplicationContext`.
`final org.springframework.context.ApplicationContext`
AbstractGenericContextLoader.`loadContext(MergedContextConfiguration mergedConfig)`
Load a `GenericApplicationContext` for the supplied `MergedContextConfiguration`.
`final org.springframework.context.ApplicationContext`
AbstractDelegatingSmartContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig)`
Deprecated, for removal: This API element is subject to removal in a future version.
as of Spring Framework 6.2.4, in favor of `AbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints)`; to be removed in Spring Framework 8.0
`final org.springframework.context.ApplicationContext`
AbstractDelegatingSmartContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig, org.springframework.aot.hint.RuntimeHints runtimeHints)`
Delegates to an appropriate candidate `SmartContextLoader` to load an `ApplicationContext` for AOT processing.
`final org.springframework.context.support.GenericApplicationContext`
AbstractGenericContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig)`
Deprecated, for removal: This API element is subject to removal in a future version.
as of Spring Framework 6.2.4, in favor of `AbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints)`; to be removed in Spring Framework 8.0
`final org.springframework.context.support.GenericApplicationContext`
AbstractGenericContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig, org.springframework.aot.hint.RuntimeHints runtimeHints)`
Load a `GenericApplicationContext` for AOT build-time processing based on the supplied `MergedContextConfiguration`.
`final org.springframework.context.ApplicationContext`
AbstractDelegatingSmartContextLoader.`loadContextForAotRuntime(MergedContextConfiguration mergedConfig, org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer)`
Delegates to an appropriate candidate `SmartContextLoader` to load an `ApplicationContext` for AOT run-time execution.
`final org.springframework.context.support.GenericApplicationContext`
AbstractGenericContextLoader.`loadContextForAotRuntime(MergedContextConfiguration mergedConfig, org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer)`
Load a `GenericApplicationContext` for AOT run-time execution based on the supplied `MergedContextConfiguration` and `ApplicationContextInitializer`.
`protected void`
AbstractContextLoader.`prepareContext(org.springframework.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)`
Prepare the `ConfigurableApplicationContext` created by this `SmartContextLoader` before bean definitions are read.
`protected MergedContextConfiguration`
AbstractTestContextBootstrapper.`processMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Process the supplied, newly instantiated `MergedContextConfiguration` instance.
`protected void`
AbstractGenericContextLoader.`validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Validate the supplied `MergedContextConfiguration` with respect to what this context loader supports.
`protected void`
AnnotationConfigContextLoader.`validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Ensure that the supplied `MergedContextConfiguration` does not contain `locations`.
`protected void`
GenericXmlContextLoader.`validateMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Ensure that the supplied `MergedContextConfiguration` does not contain `classes`.
Constructors in org.springframework.test.context.support with parameters of type MergedContextConfiguration
Modifier
Constructor
Description
``
`DefaultTestContext(Class<?> testClass, MergedContextConfiguration mergedConfig, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate)`
Construct a new `DefaultTestContext` from the supplied arguments.

## Uses of MergedContextConfiguration in org.springframework.test.context.web

Subclasses of MergedContextConfiguration in org.springframework.test.context.web
Modifier and Type
Class
Description
`class`
`WebMergedContextConfiguration`
`WebMergedContextConfiguration` encapsulates the merged context configuration declared on a test class and all of its superclasses and enclosing classes via `@ContextConfiguration`, `@WebAppConfiguration`, `@ActiveProfiles`, and `@TestPropertySource`.
Methods in org.springframework.test.context.web that return MergedContextConfiguration
Modifier and Type
Method
Description
`protected MergedContextConfiguration`
WebTestContextBootstrapper.`processMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Returns a `WebMergedContextConfiguration` if the test class in the supplied `MergedContextConfiguration` is annotated with `@WebAppConfiguration` and otherwise returns the supplied instance unmodified.
Methods in org.springframework.test.context.web with parameters of type MergedContextConfiguration
Modifier and Type
Method
Description
`final org.springframework.context.ApplicationContext`
AbstractGenericWebContextLoader.`loadContext(MergedContextConfiguration mergedConfig)`
Load a `GenericWebApplicationContext` for the supplied `MergedContextConfiguration`.
`final org.springframework.web.context.support.GenericWebApplicationContext`
AbstractGenericWebContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig)`
Deprecated, for removal: This API element is subject to removal in a future version.
as of Spring Framework 6.2.4, in favor of `AbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints)`; to be removed in Spring Framework 8.0
`final org.springframework.web.context.support.GenericWebApplicationContext`
AbstractGenericWebContextLoader.`loadContextForAotProcessing(MergedContextConfiguration mergedConfig, org.springframework.aot.hint.RuntimeHints runtimeHints)`
Load a `GenericWebApplicationContext` for AOT build-time processing based on the supplied `MergedContextConfiguration`.
`final org.springframework.web.context.support.GenericWebApplicationContext`
AbstractGenericWebContextLoader.`loadContextForAotRuntime(MergedContextConfiguration mergedConfig, org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext> initializer)`
Load a `GenericWebApplicationContext` for AOT run-time execution based on the supplied `MergedContextConfiguration` and `ApplicationContextInitializer`.
`protected MergedContextConfiguration`
WebTestContextBootstrapper.`processMergedContextConfiguration(MergedContextConfiguration mergedConfig)`
Returns a `WebMergedContextConfiguration` if the test class in the supplied `MergedContextConfiguration` is annotated with `@WebAppConfiguration` and otherwise returns the supplied instance unmodified.
Constructors in org.springframework.test.context.web with parameters of type MergedContextConfiguration
Modifier
Constructor
Description
``
`WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Deprecated.
since 6.1 in favor of `WebMergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)`
``
`WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Deprecated.
since 6.1 in favor of `WebMergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)`
``
`WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends org.springframework.context.ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, List<org.springframework.core.io.support.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)`
Create a new `WebMergedContextConfiguration` instance for the supplied parameters.
``
`WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, String resourceBasePath)`
Create a new `WebMergedContextConfiguration` instance by copying all properties from the supplied `MergedContextConfiguration`.