类 CacheProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.cache.CacheProperties
@ConfigurationProperties(prefix="spring.cache") public class CacheProperties extends Object
Configuration properties for the cache abstraction.- 从以下版本开始:
- 1.3.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCacheProperties.CaffeineCaffeine specific cache properties.static classCacheProperties.CouchbaseCouchbase specific cache properties.static classCacheProperties.EhCacheEhCache specific cache properties.static classCacheProperties.GuavaGuava specific cache properties.static classCacheProperties.Hazelcast已过时。static classCacheProperties.InfinispanInfinispan specific cache properties.static classCacheProperties.JCacheJCache (JSR-107) specific cache properties.
构造器概要
构造器 构造器 说明 CacheProperties()
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 List<String>getCacheNames()CacheProperties.CaffeinegetCaffeine()CacheProperties.CouchbasegetCouchbase()CacheProperties.EhCachegetEhcache()CacheProperties.GuavagetGuava()CacheProperties.HazelcastgetHazelcast()已过时。CacheProperties.InfinispangetInfinispan()CacheProperties.JCachegetJcache()CacheTypegetType()org.springframework.core.io.ResourceresolveConfigLocation(org.springframework.core.io.Resource config)Resolve the config location if set.voidsetCacheNames(List<String> cacheNames)voidsetType(CacheType mode)
构造器详细资料
CacheProperties
public CacheProperties()
方法详细资料
getCacheNames
public List<String> getCacheNames()
setCacheNames
public void setCacheNames(List<String> cacheNames)
getCaffeine
public CacheProperties.Caffeine getCaffeine()
getCouchbase
public CacheProperties.Couchbase getCouchbase()
getEhcache
public CacheProperties.EhCache getEhcache()
getHazelcast
@Deprecated public CacheProperties.Hazelcast getHazelcast()
已过时。
getInfinispan
public CacheProperties.Infinispan getInfinispan()
getJcache
public CacheProperties.JCache getJcache()
getGuava
public CacheProperties.Guava getGuava()
resolveConfigLocation
public org.springframework.core.io.Resource resolveConfigLocation(org.springframework.core.io.Resource config)
Resolve the config location if set.- 参数:
config- the config resource- 返回:
- the location or
nullif it is not set - 抛出:
IllegalArgumentException- if the config attribute is set to an unknown location