From e5fc2e327f85df2187b9d9dae737fea73a20341d Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Sat, 17 Oct 2020 12:10:44 +0800 Subject: [PATCH] fix bug --- .../java/com/iformall/config/RedisConfig.java | 58 ++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 60 +++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 59 ++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 60 +++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 59 ++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 58 ++++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 54 +++++++++++++++++ .../java/com/iformall/config/RedisConfig.java | 60 +++++++++++++++++++ 8 files changed, 468 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java b/mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java index 2209698a7..f38bb2302 100644 --- a/mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkAdmin/src/main/java/com/iformall/config/RedisConfig.java @@ -83,6 +83,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java b/mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java index ba613bdbd..beec553dc 100644 --- a/mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkBApi/src/main/java/com/iformall/config/RedisConfig.java @@ -67,6 +67,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java b/mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java index d246d027c..01d77eae1 100644 --- a/mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkCallback/src/main/java/com/iformall/config/RedisConfig.java @@ -83,6 +83,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java b/mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java index 134101e77..5ce1070da 100644 --- a/mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkMQConsumer/src/main/java/com/iformall/config/RedisConfig.java @@ -83,6 +83,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java b/mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java index ea5936826..b48b50166 100644 --- a/mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkPosApi/src/main/java/com/iformall/config/RedisConfig.java @@ -65,6 +65,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java b/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java index 2c027a7af..fd58408be 100644 --- a/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkSchedule/src/main/java/com/iformall/config/RedisConfig.java @@ -83,6 +83,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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); diff --git a/mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java b/mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java index bcad41cbc..4841c442c 100644 --- a/mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java +++ b/mallinkSysAdmin/src/main/java/com/iformall/config/RedisConfig.java @@ -83,6 +83,12 @@ public class RedisConfig extends CachingConfigurerSupport { RedisTemplate template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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); diff --git a/mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java b/mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java index a4478de5b..d7e790805 100644 --- a/mallinkWebSocketServer/src/main/java/com/iformall/config/RedisConfig.java +++ b/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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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> template = new RedisTemplate<>(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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 template = new RedisTemplate(); Jackson2JsonRedisSerializer 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 template = new RedisTemplate(); Jackson2JsonRedisSerializer j = new Jackson2JsonRedisSerializer(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);