Open
Conversation
ownue
reviewed
Jan 9, 2026
Collaborator
ownue
left a comment
There was a problem hiding this comment.
이번 과제에서 예외 처리랑 Validation 흐름을 직접 잡는 것이 어려웠을 수도 있는데 아주 잘해주셨습니다!! 이대로 연합 프로젝트에서도 무리 없이 잘 하실 수 있으리라 믿습니다 ㅎ.ㅎ
과제 진행하시느라 수고 많으셨습니다~!
| private final PostService postService; | ||
|
|
||
| @PostMapping() | ||
| public PostResponseDto createPost(@RequestBody PostRequestDto requestDto){ |
Collaborator
There was a problem hiding this comment.
지금 PostController.createPost()에서 @Valid가 빠져 있어서 실제 검증이 동작하지 않습니다...! DTO에는 잘 넣어두셔서, 컨트롤러에 @Valid만 추가해주면 서연님이 의도하신 대로 동작할 수 있습니다! 다음에는 꼭 컨트롤러단에 @Valid를 넣어주세요!
|
|
||
| @Transactional | ||
| public PostResponseDto createPost(PostRequestDto requestDto){ | ||
| Member member = memberRepository.findById(requestDto.getMemberId()).orElseThrow(() -> new IllegalArgumentException("존재하지 않는 회원입니다.")); |
Collaborator
There was a problem hiding this comment.
여기도 GeneralException으로 에러 핸들링 해줄 수 있을 것 같습니당
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.
2주차 실습
구현 내용
@NotBlank@Email@SizeGeneralException,ErrorCode) 적용설정
※ feature 브랜치에서만 작업하였고, merge는 진행하지 않았습니다.