mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
63fac1b7c8
Prior to this commit, the default CacheAwareContextLoaderDelegate could be configured by extending AbstractTestContextBootstrapper and overriding getCacheAwareContextLoaderDelegate(); however, this required that the user configure the custom TestContextBootstrapper via @BootstrapWith. This commit introduces a new "spring.test.context.default.CacheAwareContextLoaderDelegate" property that can be configured via a JVM system property or via the SpringProperties mechanism. BootstrapUtils uses this new property to load the default CacheAwareContextLoaderDelegate. If the property is not defined, BootstrapUtils will fall back to creating a DefaultCacheAwareContextLoaderDelegate as it did previously. This allows third parties to configure the default CacheAwareContextLoaderDelegate transparently for the user -- for example, to intercept context loading in order to load the context in a different manner -- for example, to make use of ahead of time (AOT) techniques for implementing a different type of ApplicationContext at build time. Closes gh-27540