From 5094b37cb0da7fa73b1fdd574236a82e73b72c6e Mon Sep 17 00:00:00 2001 From: Ryula Date: Fri, 17 Nov 2023 18:07:30 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20=EB=82=B4=20=EB=A3=A8=ED=8B=B4=20Datet?= =?UTF-8?q?ime=20format=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../how/Domain/dto/routine/RoutineMeDetailMapping.java | 8 ++++---- src/main/java/inha/how/Domain/entity/BaseTimeEntity.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/inha/how/Domain/dto/routine/RoutineMeDetailMapping.java b/src/main/java/inha/how/Domain/dto/routine/RoutineMeDetailMapping.java index 4ab95c7..3f5a9eb 100644 --- a/src/main/java/inha/how/Domain/dto/routine/RoutineMeDetailMapping.java +++ b/src/main/java/inha/how/Domain/dto/routine/RoutineMeDetailMapping.java @@ -1,16 +1,16 @@ package inha.how.Domain.dto.routine; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + import java.time.LocalDateTime; public interface RoutineMeDetailMapping { - //운동 id - //운동 제목 - //운동 횟수 - //내 루틴 생성 일자 Long getRoutineId(); String getRoutineSubject(); Integer getCount(); + @JsonFormat(pattern = "yyyy-MM-dd") LocalDateTime getCreateDate(); } diff --git a/src/main/java/inha/how/Domain/entity/BaseTimeEntity.java b/src/main/java/inha/how/Domain/entity/BaseTimeEntity.java index 8e96b59..10ac980 100644 --- a/src/main/java/inha/how/Domain/entity/BaseTimeEntity.java +++ b/src/main/java/inha/how/Domain/entity/BaseTimeEntity.java @@ -5,6 +5,7 @@ import lombok.Getter; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime;