|
|
|
@@ -1,5 +1,8 @@ |
|
|
|
package com.iformall.config; |
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonAutoDetect; |
|
|
|
import com.fasterxml.jackson.annotation.PropertyAccessor; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.BaseCUserEntity; |
|
|
|
@@ -64,6 +67,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, PushLimit> template = new RedisTemplate<String, PushLimit>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<PushLimit> j = new Jackson2JsonRedisSerializer<PushLimit>(PushLimit.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -81,6 +88,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxScoreRules> template = new RedisTemplate<String, WxScoreRules>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxScoreRules> j = new Jackson2JsonRedisSerializer<WxScoreRules>(WxScoreRules.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -98,6 +109,12 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxCUser> template = new RedisTemplate<String, WxCUser>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxCUser> j = new Jackson2JsonRedisSerializer<WxCUser>(WxCUser.class); |
|
|
|
|
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -115,6 +132,12 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, BaseCUserEntity> template = new RedisTemplate<String, BaseCUserEntity>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<BaseCUserEntity> j = new Jackson2JsonRedisSerializer<BaseCUserEntity>(BaseCUserEntity.class); |
|
|
|
|
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -132,6 +155,11 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxCUserBasicInfo> template = new RedisTemplate<String, WxCUserBasicInfo>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxCUserBasicInfo> j = new Jackson2JsonRedisSerializer<WxCUserBasicInfo>(WxCUserBasicInfo.class); |
|
|
|
|
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -149,6 +177,11 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxMall> template = new RedisTemplate<String, WxMall>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxMall> j = new Jackson2JsonRedisSerializer<WxMall>(WxMall.class); |
|
|
|
|
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -166,6 +199,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, List<WxMall>> template = new RedisTemplate<String, List<WxMall>>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<List> j = new Jackson2JsonRedisSerializer<List>(List.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -183,6 +220,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxCouponCVo> template = new RedisTemplate<String, WxCouponCVo>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxCouponCVo> j = new Jackson2JsonRedisSerializer<WxCouponCVo>(WxCouponCVo.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
template.setHashKeySerializer(j); |
|
|
|
@@ -200,6 +241,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
@@ -218,6 +263,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxBuser> template = new RedisTemplate(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxBuser> j = new Jackson2JsonRedisSerializer(WxBuser.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
@@ -236,6 +285,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxOrder> template = new RedisTemplate<>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxOrder> j = new Jackson2JsonRedisSerializer(WxOrder.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
@@ -254,6 +307,10 @@ public class RedisConfig extends CachingConfigurerSupport { |
|
|
|
RedisTemplate<String, WxAppinfo> template = new RedisTemplate<>(); |
|
|
|
|
|
|
|
Jackson2JsonRedisSerializer<WxAppinfo> j = new Jackson2JsonRedisSerializer(WxAppinfo.class); |
|
|
|
ObjectMapper om = new ObjectMapper(); |
|
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
|
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
|
|
|
j.setObjectMapper(om); |
|
|
|
|
|
|
|
// value值的序列化 |
|
|
|
template.setValueSerializer(j); |
|
|
|
|