648540858
2023-04-04 b4048fbe80dba8e7756ae557a15ab60b4f80a44b
src/main/java/com/genersoft/iot/vmp/conf/redis/RedisConfig.java
@@ -8,6 +8,7 @@
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.listener.PatternTopic;
@@ -22,6 +23,7 @@
 * 
 */
@Configuration
@Order(value=1)
public class RedisConfig extends CachingConfigurerSupport {
   @Autowired
@@ -47,6 +49,7 @@
   @Bean
   public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
      RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
      // 使用fastJson序列化
      FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer(Object.class);