Open
Conversation
thepackour
reviewed
Dec 1, 2025
| Post created = postService.create(title, content, userId); | ||
| return ResponseEntity.status(HttpStatus.CREATED).body(created); | ||
| } catch (IllegalArgumentException e) { | ||
| return ResponseEntity.badRequest().body(Map.of("error", e.getMessage())); |
There was a problem hiding this comment.
ResponseEntity를 활용하여 예외 발생 시 보낼 응답에 대해서도 설계하신 점이 좋다고 생각합니다.
|
|
||
| return created; | ||
| // Search | ||
| @GetMapping("/search") |
There was a problem hiding this comment.
REST 원칙 상 URI에 동사 사용은 지양해야 하는 것으로 알고 있습니다. @GetMapping으로 수정하여 query string으로 접근할 수 있도록 하는게 좋을 것 같습니다.
| @JoinColumn(name = "post_id", nullable = false) | ||
| private Post post; | ||
|
|
||
| public Comment() { |
There was a problem hiding this comment.
다른 엔티티도 마찬가지로 빌더 패턴을 쓰지 않고 생성자를 사용하는 특별한 이유가 있는지 궁금합니다.
There was a problem hiding this comment.
.gitignore에 application.properties 추가해주셔야 할듯합니다.
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.
과제 세부사항은 노션에 정리해두었습니다.
https://www.notion.so/5-2b13d138d33c805ab4f7fdc27bff2ceb?source=copy_link