|
|
|
@ -1,9 +1,5 @@
|
|
|
|
|
package com.ibeetl.admin.core.conf;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.util.concurrent.Callable;
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
|
import org.springframework.cache.Cache;
|
|
|
|
@ -23,6 +19,10 @@ import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
|
|
|
|
|
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
|
|
|
|
|
import org.springframework.data.redis.serializer.RedisSerializationContext.SerializationPair;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.util.concurrent.Callable;
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 支持一二级缓存,使得性能逆天快.默认不开启
|
|
|
|
|
*
|
|
|
|
@ -30,8 +30,8 @@ import org.springframework.data.redis.serializer.RedisSerializationContext.Seria
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
//@Configuration
|
|
|
|
|
//@ConditionalOnProperty(name="springext.cache.enabled", havingValue="true" ,matchIfMissing=false)
|
|
|
|
|
@Configuration
|
|
|
|
|
@ConditionalOnProperty(name="springext.cache.enabled", havingValue="true" ,matchIfMissing=false)
|
|
|
|
|
public class CacheConfig {
|
|
|
|
|
|
|
|
|
|
// 定义一个redis 的频道,默认叫cache,用于pub/sub
|
|
|
|
|