diff --git a/photo-service/src/main/java/kr/mafoo/photo/PhotoServiceApplication.java b/photo-service/src/main/java/kr/mafoo/photo/PhotoServiceApplication.java index 3aeb810..5a2b68d 100644 --- a/photo-service/src/main/java/kr/mafoo/photo/PhotoServiceApplication.java +++ b/photo-service/src/main/java/kr/mafoo/photo/PhotoServiceApplication.java @@ -2,9 +2,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.data.r2dbc.config.EnableR2dbcAuditing; -@EnableR2dbcAuditing @SpringBootApplication public class PhotoServiceApplication { diff --git a/photo-service/src/main/java/kr/mafoo/photo/domain/PhotoEntity.java b/photo-service/src/main/java/kr/mafoo/photo/domain/PhotoEntity.java index 848be66..5084cb5 100644 --- a/photo-service/src/main/java/kr/mafoo/photo/domain/PhotoEntity.java +++ b/photo-service/src/main/java/kr/mafoo/photo/domain/PhotoEntity.java @@ -35,11 +35,9 @@ public class PhotoEntity implements Persistable { @Column("display_index") private Integer displayIndex; - @CreatedDate @Column("created_at") private LocalDateTime createdAt; - @LastModifiedDate @Column("updated_at") private LocalDateTime updatedAt; @@ -92,6 +90,8 @@ public static PhotoEntity newPhoto(String photoId, String photoUrl, BrandType br photo.ownerMemberId = ownerMemberId; photo.displayIndex = 0; photo.isNew = true; + photo.createdAt = LocalDateTime.now(); + photo.updatedAt = LocalDateTime.now(); return photo; } }