代码优化
This commit is contained in:
parent
878f15bd44
commit
26ecc8dd34
@ -82,16 +82,10 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|||||||
template.setHashValueSerializer(fastJsonRedisSerializer);
|
template.setHashValueSerializer(fastJsonRedisSerializer);
|
||||||
// fastjson 升级到 1.2.83 后需要指定序列化白名单
|
// fastjson 升级到 1.2.83 后需要指定序列化白名单
|
||||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain");
|
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.mnt.domain");
|
||||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.domain");
|
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.quartz.domain");
|
||||||
ParserConfig.getGlobalInstance().addAccept("me.zhengjie.modules.system.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
|
// key的序列化采用StringRedisSerializer
|
||||||
template.setKeySerializer(new StringRedisSerializer());
|
template.setKeySerializer(new StringRedisSerializer());
|
||||||
template.setHashKeySerializer(new StringRedisSerializer());
|
template.setHashKeySerializer(new StringRedisSerializer());
|
||||||
|
Loading…
Reference in New Issue
Block a user