+ 默认关闭缓存,通过配置文件开启

This commit is contained in:
wuy 2019-08-06 17:02:38 +08:00
parent 0583e09c47
commit fdb35d757d
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ public class MemoryCondition implements Condition {
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
//获取配置信息
Boolean enableCached = context.getEnvironment().getProperty(AuthCacheProperties.CACHE_PREFIX + ".permission-caching-enabled", Boolean.class);
enableCached = enableCached == null ? true : enableCached;
enableCached = enableCached == null ? false : enableCached;
AuthCacheProperties.CacheWay cacheWay = context.getEnvironment().getProperty(AuthCacheProperties.CACHE_PREFIX + ".cache-way", AuthCacheProperties.CacheWay.class);
cacheWay = cacheWay == null ? AuthCacheProperties.CacheWay.MEMORY : cacheWay;
return enableCached && AuthCacheProperties.CacheWay.MEMORY.equals(cacheWay);