I am getting this error while I am trying to saving my jsonObject to redis :
Could not write JSON: Java 8 date/time type java.time.LocalDateTime not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling.
As a solution I have added this module in my pom. xml and also using object mapper added the module but still I am getting this error.
If you can't deserialize LocalDate or LocalDatetime when get from redis cache. this caused by jackson-datatype-jsr310. However, even if this module is included, you will still get a warning.
In my case: find my redis cache config. And I'll found this default cache config.
and GenericJackson2JsonRedisSerializer() used ObjectMapper.
so i changed my code like this:
so this JavaTimeModule() has 'jackson-datatype-jsr310' and my case solved.