|
@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.framework.conf;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
|
|
|
+import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import org.springframework.cache.CacheManager;
|
|
import org.springframework.cache.CacheManager;
|
|
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
|
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
|
@@ -81,6 +82,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|
ObjectMapper om = new ObjectMapper();
|
|
ObjectMapper om = new ObjectMapper();
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
|
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
|
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
|
|
|
+ om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
|
jackson2JsonRedisSerializer.setObjectMapper(om);
|
|
jackson2JsonRedisSerializer.setObjectMapper(om);
|
|
// 配置redisTemplate
|
|
// 配置redisTemplate
|
|
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
|
|
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
|