Class CxboxCacheAutoConfiguration
- java.lang.Object
-
- org.cxbox.core.autoconfigure.cache.CxboxCacheAutoConfiguration
-
@AutoConfiguration @ConditionalOnClass(org.springframework.cache.CacheManager.class) @ConditionalOnMissingBean(name="cxboxCacheResolver") @ConditionalOnBean(org.springframework.cache.interceptor.CacheAspectSupport.class) @AutoConfigureAfter(org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration.class) public class CxboxCacheAutoConfiguration extends Object
Auto-configuration class which declares "cxboxCacheResolver" bean of type CacheResolver.
As it says in the Spring documentation:
Auto-configuration is non-invasive. At any point, you can start to define your own configuration to replace specific parts of the auto-configuration.
It follows that if you declare a bean with name "cxboxCacheResolver" and type
CacheResolverin a project, which defines dependency on Cxbox, this autoconfiguration will be ignored, otherwise it will create the "cxboxCacheResolver" beandefined below. A bean named "cxboxCacheResolver" is used by Cxbox in all annotations which are related to Spring cache abstraction.@AutoConfigurationis nothing but alias for@Configuration, it is used to exclude a class from component scanning (see@BeanScan).- See Also:
CacheManagerBasedCacheResolver
-
-
Constructor Summary
Constructors Constructor Description CxboxCacheAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<org.springframework.cache.CacheManager>buildCacheManagers()protected org.springframework.cache.CacheManagerbuildRequestAwareCacheManager(String cacheName)protected org.springframework.cache.CacheManagerbuildUnExpirableCacheManager(String... names)org.springframework.cache.interceptor.CacheResolvercxboxCacheResolver(MetaHotReloadService metaHotReloadService)CxboxRequestAwareCacheHolderrequestCache()
-
-
-
Method Detail
-
cxboxCacheResolver
@Bean public org.springframework.cache.interceptor.CacheResolver cxboxCacheResolver(MetaHotReloadService metaHotReloadService)
-
requestCache
@Bean @RequestScope public CxboxRequestAwareCacheHolder requestCache()
-
buildCacheManagers
protected List<org.springframework.cache.CacheManager> buildCacheManagers()
-
buildUnExpirableCacheManager
protected org.springframework.cache.CacheManager buildUnExpirableCacheManager(String... names)
-
buildRequestAwareCacheManager
protected org.springframework.cache.CacheManager buildRequestAwareCacheManager(String cacheName)
-
-