Merged
Conversation
7 tasks
wch-os
approved these changes
Jun 17, 2025
Member
wch-os
left a comment
There was a problem hiding this comment.
꼼꼼히 주석을 달아주셔, 코드를 읽고 이해하기 수월했습니다!
Jpa 내 Pageable 사용과 JSON 컬럼 지정, Mapper 사용 측면에서 새롭게 알아가는 부분도 많았던 리뷰였던 것 같습니다!
수고 많으셨습니다!!👍
| public CommentEntityStatus status; | ||
|
|
||
| @Convert(converter = ReplyListConverter.class) | ||
| @JdbcTypeCode(SqlTypes.JSON) |
|
|
||
| private final ObjectMapper objectMapper = new ObjectMapper() | ||
| .registerModule(new JavaTimeModule()) | ||
| .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); // 날짜 필드를 숫자가 아닌 ISO 8601 문자열("2025-06-06T04:37:00Z")로 직렬화합니다. |
Member
There was a problem hiding this comment.
아하 ReplyEntity의 LongBaseTimeEntity 시간 관련 필드들을 직렬화, 역직렬화하기 위해서는 해당 작업이 필요하나 보네요!
| import org.mapstruct.Mapper; | ||
|
|
||
| @Mapper(componentModel = "spring") | ||
| @Mapper(componentModel = "spring", uses = ReplyEntityMapper.class) |
Member
There was a problem hiding this comment.
현재 mapper 클래스에서 다른 mapper를 사용할 수 있게 지정할 수도 있네요..!!
| @Param("commentId") Long commentId, | ||
| @Param("createdAt") Instant createdAt, | ||
| @Param("status") ReplyEntityStatus status, | ||
| Pageable pageable); |
Member
There was a problem hiding this comment.
모든 데이터를 조회해서 메모리에 불러오는 대신에, Pageable을 파라미터로 이렇게 가볍게도 호출할 수 있군요!!👍
jilpoom
approved these changes
Jun 17, 2025
sweetykr7
approved these changes
Jun 22, 2025
Contributor
sweetykr7
left a comment
There was a problem hiding this comment.
댓글의 답글을 JSON 컬럼으로 관리하는 방식이 깔끔하게 잘 설계된 것 같습니다~!
페이지 내 reply만 comment 테이블에 반영하는 구조도 성능을 잘 고려하신 부분이라 인상 깊습니다.
ReplyListConverter 예외 처리도 꼼꼼하게 되어 있어서 좋았습니다.
리뷰를 보기 편하게 잘 적어주셔서 감사합니다 ^^
성능 비교 결과도 기대됩니다, 좋은 작업 감사합니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
Description
✅ JSON 컬럼 직렬화를 위해 필요한 라이브러리 import
✅ CommentEntity 클래스
✅ ReplyListConverter 클래스
Review Points
향후 성능 테스트를 위해 남겨 놓았습니다. 코드 리뷰시 참고해주시면 감사하겠습니다!
How Has This Been Tested?
Additional Notes