Uses of Class
org.springframework.test.context.MergedContextConfiguration
Packages that use MergedContextConfiguration
Package
Description
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.
Ahead-of-time (AOT) support for the Spring TestContext Framework.
Support for context caching within the Spring TestContext Framework.
Support classes for the Spring TestContext Framework.
Web support classes for the Spring TestContext Framework.
-
Uses of MergedContextConfiguration in org.springframework.test.context
Methods in org.springframework.test.context that return MergedContextConfigurationModifier and TypeMethodDescriptionTestContextBootstrapper.buildMergedContextConfiguration()Build the merged context configuration for the test class in theBootstrapContextassociated with this bootstrapper.MergedContextConfiguration.getParent()Get theMergedContextConfigurationfor the parent application context in a context hierarchy.Methods in org.springframework.test.context with parameters of type MergedContextConfigurationModifier and TypeMethodDescriptionvoidCacheAwareContextLoaderDelegate.closeContext(MergedContextConfiguration mergedConfig, DirtiesContext.HierarchyMode hierarchyMode) Remove the application context for the suppliedMergedContextConfigurationfrom theContextCacheand close it if it is an instance ofConfigurableApplicationContext.voidContextCustomizer.customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Customize the suppliedConfigurableApplicationContextafter bean definitions have been loaded into the context but before the context has been refreshed.default booleanCacheAwareContextLoaderDelegate.isContextLoaded(MergedContextConfiguration mergedConfig) Determine if the application context for the suppliedMergedContextConfigurationhas been loaded (i.e., is present in theContextCache).CacheAwareContextLoaderDelegate.loadContext(MergedContextConfiguration mergedConfig) Load the application context for the suppliedMergedContextConfigurationby delegating to theContextLoaderconfigured in the givenMergedContextConfiguration.SmartContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load a newApplicationContextbased on the suppliedMergedContextConfiguration, configure the context, and return the context in a fully refreshed state.Constructors in org.springframework.test.context with parameters of type MergedContextConfigurationModifierConstructorDescriptionMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Deprecated.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, List<PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(MergedContextConfiguration mergedConfig) Create a newMergedContextConfigurationinstance by copying all fields from the suppliedMergedContextConfiguration. -
Uses of MergedContextConfiguration in org.springframework.test.context.aot
Methods in org.springframework.test.context.aot with parameters of type MergedContextConfigurationModifier and TypeMethodDescriptiondefault ApplicationContextAotContextLoader.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 ofAotContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0default ApplicationContextAotContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig, RuntimeHints runtimeHints) Load a newApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration, configure the context, and return the context.AotContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) Load a newApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer. -
Uses of MergedContextConfiguration in org.springframework.test.context.cache
Methods in org.springframework.test.context.cache with parameters of type MergedContextConfigurationModifier and TypeMethodDescriptionvoidDefaultCacheAwareContextLoaderDelegate.closeContext(MergedContextConfiguration mergedConfig, DirtiesContext.HierarchyMode hierarchyMode) booleanContextCache.contains(MergedContextConfiguration key) Determine whether there is a cached context for the given key.booleanDefaultContextCache.contains(MergedContextConfiguration key) ContextCache.get(MergedContextConfiguration key) Obtain a cachedApplicationContextfor the given key.DefaultContextCache.get(MergedContextConfiguration key) default intContextCache.getFailureCount(MergedContextConfiguration key) Get the failure count for the given key.intDefaultContextCache.getFailureCount(MergedContextConfiguration key) default voidContextCache.incrementFailureCount(MergedContextConfiguration key) Increment the failure count for the given key.voidDefaultContextCache.incrementFailureCount(MergedContextConfiguration key) booleanDefaultCacheAwareContextLoaderDelegate.isContextLoaded(MergedContextConfiguration mergedConfig) DefaultCacheAwareContextLoaderDelegate.loadContext(MergedContextConfiguration mergedConfig) protected ApplicationContextDefaultCacheAwareContextLoaderDelegate.loadContextInternal(MergedContextConfiguration mergedConfig) Load theApplicationContextfor the supplied merged context configuration.voidContextCache.put(MergedContextConfiguration key, ApplicationContext context) Explicitly add anApplicationContextinstance to the cache under the given key, potentially honoring a custom eviction policy.voidDefaultContextCache.put(MergedContextConfiguration key, ApplicationContext context) voidContextCache.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 ofConfigurableApplicationContext.voidDefaultContextCache.remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode) -
Uses of MergedContextConfiguration in org.springframework.test.context.support
Methods in org.springframework.test.context.support that return MergedContextConfigurationModifier and TypeMethodDescriptionAbstractTestContextBootstrapper.buildMergedContextConfiguration()protected MergedContextConfigurationAbstractTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Process the supplied, newly instantiatedMergedContextConfigurationinstance.Methods in org.springframework.test.context.support with parameters of type MergedContextConfigurationModifier and TypeMethodDescriptionprotected voidAbstractContextLoader.customizeContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Customize theConfigurableApplicationContextcreated by thisContextLoaderafter bean definitions have been loaded into the context but before the context has been refreshed.protected voidAbstractGenericContextLoader.loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) Load bean definitions into the suppliedcontextfrom the locations or classes in the suppliedMergedContextConfiguration.protected voidAnnotationConfigContextLoader.loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) Register classes in the suppliedcontextfrom the classes in the suppliedMergedContextConfiguration.protected voidGenericGroovyXmlContextLoader.loadBeanDefinitions(GenericApplicationContext context, MergedContextConfiguration mergedConfig) Load bean definitions into the suppliedcontextfrom the locations in the suppliedMergedContextConfigurationusing aGroovyBeanDefinitionReader.final ApplicationContextAbstractDelegatingSmartContextLoader.loadContext(MergedContextConfiguration mergedConfig) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContext.final ApplicationContextAbstractGenericContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load aGenericApplicationContextfor the suppliedMergedContextConfiguration.final ApplicationContextAbstractDelegatingSmartContextLoader.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 ofAbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0final ApplicationContextAbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig, RuntimeHints runtimeHints) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContextfor AOT processing.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 ofAbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0AbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig, RuntimeHints runtimeHints) Load aGenericApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration.final ApplicationContextAbstractDelegatingSmartContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContextfor AOT run-time execution.AbstractGenericContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) Load aGenericApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer.protected voidAbstractContextLoader.prepareContext(ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Prepare theConfigurableApplicationContextcreated by thisSmartContextLoaderbefore bean definitions are read.protected MergedContextConfigurationAbstractTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Process the supplied, newly instantiatedMergedContextConfigurationinstance.protected voidAbstractGenericContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Validate the suppliedMergedContextConfigurationwith respect to what this context loader supports.protected voidAnnotationConfigContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containlocations.protected voidGenericXmlContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containclasses.Constructors in org.springframework.test.context.support with parameters of type MergedContextConfigurationModifierConstructorDescriptionDefaultTestContext(Class<?> testClass, MergedContextConfiguration mergedConfig, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate) Construct a newDefaultTestContextfrom the supplied arguments. -
Uses of MergedContextConfiguration in org.springframework.test.context.web
Subclasses of MergedContextConfiguration in org.springframework.test.context.webModifier and TypeClassDescriptionclassWebMergedContextConfigurationencapsulates 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 MergedContextConfigurationModifier and TypeMethodDescriptionprotected MergedContextConfigurationWebTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.Methods in org.springframework.test.context.web with parameters of type MergedContextConfigurationModifier and TypeMethodDescriptionfinal ApplicationContextAbstractGenericWebContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load aGenericWebApplicationContextfor the suppliedMergedContextConfiguration.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 ofAbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration, RuntimeHints); to be removed in Spring Framework 8.0AbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig, RuntimeHints runtimeHints) Load aGenericWebApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration.AbstractGenericWebContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, ApplicationContextInitializer<ConfigurableApplicationContext> initializer) Load aGenericWebApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer.protected MergedContextConfigurationWebTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.Constructors in org.springframework.test.context.web with parameters of type MergedContextConfigurationModifierConstructorDescriptionWebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, List<PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newWebMergedContextConfigurationinstance for the supplied parameters.WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, String resourceBasePath) Create a newWebMergedContextConfigurationinstance by copying all properties from the suppliedMergedContextConfiguration.
MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)