Skip to content

Commit

Permalink
Feat: LocalDateTime 역직렬화 추가 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaewon-pro authored Aug 4, 2024
1 parent cf158ad commit ca8eff0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}

0 comments on commit ca8eff0

Please sign in to comment.