Переглянути джерело

fix bug

release_toaliyun_real
xiaohanzi 5 роки тому
джерело
коміт
e5fc2e327f
8 змінених файлів з 468 додано та 0 видалено
  1. +58
    -0
      mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java
  2. +60
    -0
      mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java
  3. +59
    -0
      mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java
  4. +60
    -0
      mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java
  5. +59
    -0
      mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java
  6. +58
    -0
      mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java
  7. +54
    -0
      mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java
  8. +60
    -0
      mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java

+ 58
- 0
mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -83,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -100,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -132,6 +144,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -149,6 +167,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -166,6 +190,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -183,6 +213,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -200,6 +236,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -218,6 +259,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -236,6 +282,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -253,6 +305,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 60
- 0
mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -67,6 +67,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -84,6 +90,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -101,6 +113,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -118,6 +136,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -135,6 +159,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -152,6 +182,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -169,6 +205,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -186,6 +228,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -203,6 +251,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -220,6 +274,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 59
- 0
mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -83,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -100,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -132,6 +144,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -149,6 +167,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -166,6 +190,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -183,6 +213,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -200,6 +236,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -217,6 +259,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -235,6 +282,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -252,6 +305,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 60
- 0
mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -83,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -100,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -117,6 +129,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -134,6 +152,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -151,6 +175,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -168,6 +198,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -185,6 +221,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -202,6 +244,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -220,6 +268,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -238,6 +292,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 59
- 0
mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -65,6 +65,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -82,6 +88,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -99,6 +111,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -116,6 +134,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -133,6 +157,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -150,6 +180,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -167,6 +203,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -184,6 +226,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -202,6 +250,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -220,6 +273,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 58
- 0
mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -83,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -100,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -117,6 +129,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -134,6 +152,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -151,6 +175,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -168,6 +198,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -185,6 +221,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -202,6 +244,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -220,6 +267,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -238,6 +290,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 54
- 0
mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -83,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -100,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -132,6 +144,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -149,6 +167,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -166,6 +190,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -183,6 +213,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -200,6 +236,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -217,6 +259,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -234,6 +282,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


+ 60
- 0
mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java Переглянути файл

@@ -2,6 +2,7 @@ package com.iformall.config;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.*;
@@ -82,6 +83,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -99,6 +106,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -116,6 +129,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -133,6 +152,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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -150,6 +175,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -167,6 +198,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -184,6 +221,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -201,6 +244,11 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);

// value值的序列化
template.setValueSerializer(j);
@@ -219,6 +267,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);
@@ -236,6 +290,12 @@ 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.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
j.setObjectMapper(om);
// value值的序列化
template.setValueSerializer(j);
template.setHashKeySerializer(j);


Завантаження…
Відмінити
Зберегти