diff --git a/src/main/java/com/dnd/runus/presentation/config/ObjectMapperConfig.java b/src/main/java/com/dnd/runus/presentation/config/ObjectMapperConfig.java index 8ce62a2d..c3c8f9a0 100644 --- a/src/main/java/com/dnd/runus/presentation/config/ObjectMapperConfig.java +++ b/src/main/java/com/dnd/runus/presentation/config/ObjectMapperConfig.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; import com.fasterxml.jackson.datatype.jsr310.ser.*; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -38,10 +39,9 @@ ObjectMapper objectMapper() { InstantSerializer.INSTANCE, false, false, - dateTimeFormatter.withZone(SERVER_TIMEZONE_ID)) {}); - + dateTimeFormatter.withZone(SERVER_TIMEZONE_ID)) {}) + .addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(dateTimeFormatter)); objectMapper.registerModule(dateTimeModule); - return objectMapper; } }