diff --git a/pom.xml b/pom.xml index 5f1c7fe..a587def 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,11 @@ jaxb-runtime ${jakarta.jaxb.impl.version} + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.17.1 + diff --git a/src/main/java/com/banesco/common/infraestructure/helpers/JsonHelper.java b/src/main/java/com/banesco/common/infraestructure/helpers/JsonHelper.java index 1315bb0..c931239 100644 --- a/src/main/java/com/banesco/common/infraestructure/helpers/JsonHelper.java +++ b/src/main/java/com/banesco/common/infraestructure/helpers/JsonHelper.java @@ -11,6 +11,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; public class JsonHelper { @@ -20,6 +21,8 @@ public class JsonHelper { static { MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + MAPPER.registerModule(new JavaTimeModule()); + MAPPER.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); } /**