Annotation Interface AutoConfigureCache
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Inherited
@ImportAutoConfiguration
public @interface AutoConfigureCache
Annotation that can be applied to a test class to customize the
cache provider. By default, a
NoOpCacheManager is
auto-configured
As for the regular auto-configuration, this has no effect if a custom
CacheManager is defined.
- Since:
- 1.4.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionorg.springframework.boot.autoconfigure.cache.CacheTypeTheCacheTypeto configure, overriding the behavior for testing purposes.
-
Element Details
-
cacheProvider
@PropertyMapping("spring.cache.type") org.springframework.boot.autoconfigure.cache.CacheType cacheProviderTheCacheTypeto configure, overriding the behavior for testing purposes.- Returns:
- the cache type to configure
- Default:
- NONE
-