Open
Conversation
This reverts commit 6bb6db2.
Martinel2
approved these changes
Nov 23, 2025
Martinel2
left a comment
There was a problem hiding this comment.
3주차도 수고하셨습니당 코드를 너무 잘 작성하셔서 리뷰드릴게 따로 없을정도네요!! 메소드명 혹은 리팩토링할 수 있는 부분들을 쪼개는 연습만 하시면 저보다 더 잘하실거 같네요..
| } | ||
|
|
||
| @GetMapping("/show/{content}") | ||
| public ResponseEntity<List<PostResponse>> showPost(@PathVariable String content) { |
There was a problem hiding this comment.
메소드의 이름을 searchPostByKeyword 와같이 명확하게 한다면, 추후에 코드를 수정해야하는 경우에 메소드명만 보고도 기능을 유추할 수 있어 더 좋을 것 같아요! (service쪽도 마찬가지!!)
| @RestController | ||
| @RequestMapping("/sns/reply") | ||
| @RequiredArgsConstructor | ||
| public class ReplyController { |
There was a problem hiding this comment.
reply라면 답글을 의미하는 것 같다고 생각했는데, 그렇다면 댓글과 답글을 따로 관리하는 방식인가요?
| private long postId; | ||
| private long replyId; | ||
|
|
||
| @BeforeEach |
| return repliesResponse; | ||
| } | ||
|
|
||
| @Transactional |
There was a problem hiding this comment.
@transactional을 Service 클래스자체에 할당하면 @transactional을 모든 메소드가 가진 것과 같은 효과를 가집니다!
| import javax.naming.AuthenticationException; | ||
|
|
||
| @RestControllerAdvice | ||
| public class GlobalExceptionHandler extends ResponseEntityExceptionHandler { |
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.
변경점 👍
Member Entity를 User로 구현했고, Post에 검색 기능을 추가해 Post의 내용에 포함된 단어를 검색 시 해당 Post가 나오도록 하였고, 좋아요 기능도 Post에 추가하였습니다.
버그 해결 💊
Test Code를 진행할 때 Setup 과정에서 Test Entity들을 등록할 때, ID 설정 방식 불일치, 참조되는 키가 있는 Table의 내용 삭제 불가 등 DB와 관련한 오류를 해결하였습니다.
테스트 💻
Test Code로 좋아요 Test인 likeTest, 검색 결과 Test인 searchTest를 구현해 진행하였습니다.
스크린샷 🖼
비고 ✏
여러 가지 사항을 한번에 고려하지 못해서, 엉성한 데가 많습니다. 현재 만든 기능에서 허점이 보이면 언제든지 알려주시고, 미처 지난 주 내용을 수정하지 못한 부분이 있다면 다시 한번 알려주세요!