mirror of https://github.com/elunez/eladmin
fastjson 升级到 1.2.83 后需要指定序列化白名单
parent
3ed5383695
commit
9015cae9db
|
@ -80,10 +80,18 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|||
// value值的序列化采用fastJsonRedisSerializer
|
||||
template.setValueSerializer(fastJsonRedisSerializer);
|
||||
template.setHashValueSerializer(fastJsonRedisSerializer);
|
||||
// 全局开启AutoType,这里方便开发,使用全局的方式
|
||||
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
|
||||
// 建议使用这种方式,小范围指定白名单
|
||||
// ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain");
|
||||
// fastjson 升级到 1.2.83 后需要指定序列化白名单
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.service.dto");
|
||||
// 模块内的实体类
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.mnt.domain");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.domain");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.domain");
|
||||
// 模块内的 Dto
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.mnt.service.dto");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.service.dto");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.security.service.dto");
|
||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.service.dto");
|
||||
// key的序列化采用StringRedisSerializer
|
||||
template.setKeySerializer(new StringRedisSerializer());
|
||||
template.setHashKeySerializer(new StringRedisSerializer());
|
||||
|
|
Loading…
Reference in New Issue