+ 默认关闭缓存,通过配置文件开启
This commit is contained in:
parent
0583e09c47
commit
fdb35d757d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue