Hi, I'm using JavaTimeModule() in spring-data-redis implementation of my app and there's a strange thing:
When JsonFormat-annotation with pattern is added:
data class CacheValue(
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ")
val zonedDateTime: ZonedDateTime
)
Current object is always stored in Redis as an ISO_ZONED_DATE_TIME, e.g. "2024-11-15T18:27:06.921054+01:00[Europe/Germany]", the pattern is not taken into an account.
But then when deserialization comes, it tries to deserialize the ISO_ZONED_DATE_TIME formatted object from Redis with "yyyy-MM-dd'T'HH:mm:ss.SSSZ" pattern and fails.
Could you please give a hint, what is wrong here. I guess jackson serializer supposed to use pattern to encode the date, thank you!