[3주차] 김동빈/[feat] 게시글 도메인 API 구현#103
Open
kdobi wants to merge 4 commits intoLeets-Official:김동빈/mainfrom
Hidden character warning
The head ref may contain hidden characters: "\uae40\ub3d9\ube48/3\uc8fc\ucc28"
Open
Conversation
kallin1
approved these changes
Apr 9, 2026
There was a problem hiding this comment.
Entity와 DTO 간의 변환 로직을 PostConverter라는 별도 클래스로 분리하신 점이 인상 깊네요! 덕분에 서비스 코드가 비즈니스 로직에만 집중할 수 있어 가독성이 훨씬 좋아진 것 같습니다. 저도 다음 작업 때 이런 계층 분리를 적용해보고 싶네요. 잘 배웠습니다!
HandoA01
approved these changes
Apr 9, 2026
Comment on lines
+28
to
+31
| @Transactional | ||
| public PostResponse createPost(PostRequest request) { | ||
| User user = userRepository.findById(request.getUserId()) | ||
| .orElseThrow(() -> new PostException(BaseErrorCode.USER_NOT_FOUND)); |
There was a problem hiding this comment.
3주차 개발도 수고 많으셨습니다 :)
userId를 Request에서 직접 받으면 다른 사람 id를 넣어서 요청할 수도 있을 것 같은데, 추후 어떤 방식으로 개발하실 생각이신지 궁금합니다!
HyeonSeongIM
approved these changes
Apr 9, 2026
| import java.util.List; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/posts") |
There was a problem hiding this comment.
추후에 api 버전으로 API를 구성해보면 어떠실까요?? 예를 들어 api/v1/posts라던지 api/v1 디렉토리를 만드시면 유지보수에 더 좋은 코드가 될 것 같아요!
|
|
||
| @Service | ||
| @RequiredArgsConstructor | ||
| @Transactional(readOnly = true) |
There was a problem hiding this comment.
서비스 전체에 Transactional을 붙이기 보다는 각 메서드별로 Transactional을 붙이시는게 이후 코드 유지보수에 더 좋을 것 같아요!
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.
1. 과제 요구사항 중 구현한 내용
2. 핵심 변경 사항
3. 실행 및 검증 결과
게시글 등록 성공한 경우

게시글 등록 과정에서 제목을 입력하지 않은 경우

게시글 조회

4. 완료 사항
5. 추가 사항
#102
제출 체크리스트
{이름}/main브랜치다{이름}/{숫자}주차브랜치다Reviewer 참고