spring-framework / org.springframework.test.context.cache / DefaultCacheAwareContextLoaderDelegate

DefaultCacheAwareContextLoaderDelegate

open class DefaultCacheAwareContextLoaderDelegate : CacheAwareContextLoaderDelegate

Default implementation of the CacheAwareContextLoaderDelegate interface.

To use a static DefaultContextCache, invoke the #DefaultCacheAwareContextLoaderDelegate() constructor; otherwise, invoke the #DefaultCacheAwareContextLoaderDelegate(ContextCache) and provide a custom ContextCache implementation.

Author
Sam Brannen

Since
4.1

Constructors

<init>

DefaultCacheAwareContextLoaderDelegate()

Construct a new DefaultCacheAwareContextLoaderDelegate using a static DefaultContextCache.

This default cache is static so that each context can be cached and reused for all subsequent tests that declare the same unique context configuration within the same JVM process.

DefaultCacheAwareContextLoaderDelegate(contextCache: ContextCache)

Construct a new DefaultCacheAwareContextLoaderDelegate using the supplied ContextCache.

Functions

closeContext

open fun closeContext(mergedContextConfiguration: MergedContextConfiguration, hierarchyMode: HierarchyMode): Unit

loadContext

open fun loadContext(mergedContextConfiguration: MergedContextConfiguration): ApplicationContext