I am using Spring Boot 2, Redis server v=5.0.9, Java 14.I am trying to save object, which contains LocalDateTime field to RMap and getting next error:
"com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string."
Config for Redis:
ObjectMapper mapper = Jackson2ObjectMapperBuilder.json() .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .modules(new JSR310Module()) .build();Config config = new Config();config.useSingleServer().setAddress("redis://127.0.0.1:6379");config.setCodec(new JsonJacksonCodec(mapper));
And field:
@JsonSerialize(using = LocalDateTimeSerializer.class)@JsonDeserialize(using = LocalDateTimeDeserializer.class)private LocalDateTime timeStamp;
Tried different options from google - nothing worked.
Really need your help!