升级Fastjson到Fastjson2

This commit is contained in:
WuPeng
2022-11-05 20:49:56 +08:00
parent fb1d9ca50a
commit ab909feedf
68 changed files with 120 additions and 114 deletions

View File

@@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.conf.redis;
import com.alibaba.fastjson.parser.ParserConfig;
import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.service.redisMsg.*;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,8 +54,7 @@ public class RedisConfig extends CachingConfigurerSupport {
// value值的序列化采用fastJsonRedisSerializer
redisTemplate.setValueSerializer(fastJsonRedisSerializer);
redisTemplate.setHashValueSerializer(fastJsonRedisSerializer);
// 全局开启AutoType不建议使用
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
// key的序列化采用StringRedisSerializer
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setHashKeySerializer(new StringRedisSerializer());