Open
Conversation
Collaborator
Author
|
pr-clean 브랜치 살펴보다가 확인해보니 클래스가 깨졌는지 안보이는 것들이 좀 많네요.. |
codingjigi
approved these changes
May 21, 2025
Collaborator
codingjigi
left a comment
There was a problem hiding this comment.
코드가 엄청 깔끔해지셨는데요..? 다만 깃 충돌이 해결되지 않은 코드를 PR 로 올리셔서..
요고 먼저 해결해서 update 부탁드릴게요
| import org.springframework.web.bind.annotation.ControllerAdvice; | ||
|
|
||
| @ControllerAdvice | ||
| public class GlobalExceptionHandler { |
Collaborator
Author
There was a problem hiding this comment.
당시 예외를 어떻게 처리할지 구상하느라 전역처리만 하고 그대로 둔 것 같습니다
| BinaryContent binaryContent = new BinaryContent(fileName, (long) bytes.length, contentType, bytes); | ||
| return binaryContentRepository.save(binaryContent).getId(); | ||
| }) | ||
| .orElse(null); |
|
|
||
| import java.util.*; | ||
|
|
||
| @RequiredArgsConstructor |
| return ResponseEntity.status(HttpStatus.OK).body(updatedPublic); | ||
| } | ||
|
|
||
| @RequestMapping("/delete") |
Collaborator
There was a problem hiding this comment.
삭제는 HTTP 메서드로 표현해주세요. URL에 직접 명시하는것보단 REST API 설계 원칙을 지키는게 좋아보입니다.
|
|
||
| @RequestMapping("/delete") | ||
| @ResponseBody | ||
| public ResponseEntity<String> delete( |
Collaborator
There was a problem hiding this comment.
Request, Response 를 감싸는 객체를 만들어서 요청/응답을 통일해보세요.
| import com.sprint.mission.discodeit.dto.request.ReadStatusCreateRequest; | ||
| import com.sprint.mission.discodeit.dto.request.ReadStatusUpdateRequest; | ||
| import com.sprint.mission.discodeit.entity.Message; | ||
| >>>>>>> 3189145 (5월 15일 강의 결과물) |
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.
기본 요구사항
컨트롤러 레이어 구현
DiscodeitApplication의 테스트 로직은 삭제하세요.지금까지 구현한 서비스 로직을 활용해 웹 API를 구현하세요.
이때
@RequestMapping만 사용해 구현해보세요.웹 API의 예외를 전역으로 처리하세요.
API 테스트
Sprint4 API TEST.postman_collection.json
웹 API 요구사항
사용자 관리
권한 관리
채널 관리
메시지 관리
메시지 수신 정보 관리
바이너리 파일 다운로드
심화 요구사항
정적 리소스 서빙
사용자 목록 조회, BinaryContent 파일 조회 API를 다음의 조건을 만족하도록 수정하세요.
사용자 목록 조회
url:
/api/user/findAll요청
응답
ResponseEntity<List<UserDto>>BinaryContent 파일 조회
/api/binaryContent/findbinaryContentIdResponseEntity<BinaryContent>다음의 파일을 활용하여 사용자 목록을 보여주는 화면을 서빙해보세요.
생성형 AI 활용
멘토에게