[육선우] sprint4#77
Open
ryuk6238-dot wants to merge 20 commits intocodeit-bootcamp-spring:육선우from
Hidden character warning
The head ref may contain hidden characters: "\uc721\uc120\uc6b0sprint4"
Open
Conversation
|
커밋 메세지에 대한 규칙을 아래 컨벤션을 참고하여 작성해주시길 바랍니다 |
joonfluence
reviewed
Feb 17, 2026
There was a problem hiding this comment.
.gitignore에 추가되어야 할 파일들이 .idea 만 있을까요? 고민해보고 추가해보세요~
joonfluence
reviewed
Feb 17, 2026
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/api/binarycontents") |
There was a problem hiding this comment.
v1 버저닝을 추가 해주는 것도 좋습니다 (계속 버전이 변화될 수 있기 때문에) 나중에 추가하긴 어렵거든요
joonfluence
reviewed
Feb 17, 2026
Comment on lines
+20
to
+36
| @PostMapping( | ||
| path = "/findAll", | ||
| consumes = {MediaType.MULTIPART_FORM_DATA_VALUE} | ||
| ) | ||
| public ResponseEntity<List<BinaryContent>> findAllByIds( | ||
| @RequestPart("ids") List<UUID> ids // 파트로 UUID 리스트를 받음 | ||
| ) { | ||
| List<BinaryContent> contents = binaryContentService.findAllByIdIn(ids); | ||
| return ResponseEntity.ok(contents); | ||
| } | ||
|
|
||
|
|
||
| @GetMapping("/{id}") | ||
| public ResponseEntity<BinaryContent> find( | ||
| @PathVariable UUID id) { | ||
| BinaryContent content = binaryContentService.find(id); | ||
| return ResponseEntity.ok(content); |
There was a problem hiding this comment.
RESTFul API에서 GET이 이미 자원에 대한 조회의 의미를 내포하기 때문에 /find 굳이 추가할 필요 없습니다!
joonfluence
reviewed
Feb 17, 2026
| @RequestMapping( | ||
| path = "/create/private", | ||
| method = RequestMethod.POST, | ||
| consumes = {MediaType.MULTIPART_FORM_DATA_VALUE} |
There was a problem hiding this comment.
과제에서 요구사항 대로 하신 것 같아 이해하지만, [POST] "/api/channels/public, private" private, public을 Body 값 안에 넣어서 처리하는 방식이 더 깔끔할 것 같긴 합니다. 정말 분리되어야 하면 모르겠지만 거의 구현 코드가 비슷할거거든요
joonfluence
reviewed
Feb 17, 2026
Comment on lines
+15
to
+26
| @ExceptionHandler(Exception.class) | ||
| public ResponseEntity<ErrorResponse> handleAllExceptions(Exception e) { | ||
| ErrorResponse errorResponse = new ErrorResponse( | ||
| HttpStatus.INTERNAL_SERVER_ERROR.value(), | ||
| e.getMessage(), | ||
| LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) | ||
| ); | ||
|
|
||
| return ResponseEntity | ||
| .status(HttpStatus.INTERNAL_SERVER_ERROR) | ||
| .body(errorResponse); | ||
| } |
There was a problem hiding this comment.
전체 예외를 500대 에러로 표현해도 될까요?
400대, 500대 상태코드들을 한번 공부해보고 적용 고민해보시죠~
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.
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게