| | |
| | | |
| | | import java.time.Duration; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
| | | import org.springframework.cache.CacheManager; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); |
| | | objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
| | | // objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); |
| | | |
| | | objectMapper.activateDefaultTyping( |
| | | objectMapper.getPolymorphicTypeValidator(), |
| | | ObjectMapper.DefaultTyping.NON_FINAL, |
| | | JsonTypeInfo.As.PROPERTY); |
| | | |
| | | jackson2JsonRedisSerializer.setObjectMapper(objectMapper); |
| | | |