[이진용] sprint4#66
Open
alpha-lens wants to merge 82 commits intocodeit-bootcamp-spring:이진용from
Hidden character warning
The head ref may contain hidden characters: "\uc774\uc9c4\uc6a9-sprint4"
Open
Conversation
Date : 20260109 Today I work's... Server && Channel make test logic
로그인 로그아웃 기능 추가. 기타 버그 수정
채널 서비스 관련한 업데이트 ResponseDto를 이용하여 채널 서비스를 고도화하였으며 향후 사용자의 마지막 읽은 메시지 내용 등을 추가하는 작업이 필요함.
첨부파일 기능을 추가했다. (아직 테스트중) MVC에 맞게 조금 리팩토링했다. (Service에서 출력하는 기능 제거 등) 메시지 조회 불가능한 버그를 고쳤다. (아직 테스트 중)
로그인시에만 사용할 수 있던 것을 RequestParam을 이용해서 userId를 입력받게 했다.
ResponseEntity로 반환하던 것을 RestController로 변경함으로서 DTO를 반환하게 했다.
1. DTO 파일명을 바꿨다. 2. DTO 파일을 두 그룹으로 묶었다. 3. import 구문을 최적화했다.
profile 이미지 저장에서 filename으로 되어 있어서 확장자 저장이 안 된 것 같다.
그 외에 readme 내용을 일단 지웠다.
|
커밋 메세지에 대한 규칙을 컨벤션으로 잘 작성해주셨네요~ |
joonfluence
reviewed
Feb 14, 2026
joonfluence
reviewed
Feb 14, 2026
| import org.springframework.web.bind.annotation.RequestParam; | ||
|
|
||
| @Controller | ||
| @RequestMapping("/api/auth") |
There was a problem hiding this comment.
v1 버저닝을 추가 해주는 것도 좋습니다 (계속 버전이 변화될 수 있기 때문에) 나중에 추가하긴 어렵거든요
joonfluence
reviewed
Feb 14, 2026
| private final AuthService authService; | ||
|
|
||
| @RequestMapping(value = "/login", method = RequestMethod.POST) | ||
| public ResponseEntity<String> loginUser( |
joonfluence
reviewed
Feb 14, 2026
Comment on lines
39
to
44
| @RequestMapping(value = "/find", method = RequestMethod.GET) | ||
| public List<ResponseChannelDto> findChannel( | ||
| @RequestParam("id") UUID userId | ||
| ){ | ||
| return channelService.findAll(userId); | ||
| } |
There was a problem hiding this comment.
RESTFul API에서 GET이 이미 자원에 대한 조회의 의미를 내포하기 때문에 /find 굳이 추가할 필요 없습니다!
joonfluence
reviewed
Feb 14, 2026
| throw new NotFound("The channel does not exist."); | ||
| } | ||
|
|
||
| if(channelService.find(channelId, userId).channelType() == ChannelType.PRIVATE){ |
There was a problem hiding this comment.
ChannelType.PRIVATE.equals(targetChannel.getType())
joonfluence
reviewed
Feb 14, 2026
Comment on lines
51
to
63
| for (MultipartFile file : files) { | ||
| String fileName = file.getOriginalFilename(); | ||
| String extension = fileName.substring(fileName.lastIndexOf(".")); | ||
| if(List.of(".jpg", ".jpeg", ".png").contains(extension)) { | ||
| byte[] bytes = file.getBytes(); | ||
| RequestCreateBinaryContentDto requestBinaryContentDto = new RequestCreateBinaryContentDto(file.getContentType(), file.getOriginalFilename(), bytes); | ||
| binaryContentIds.add(binaryContentService.create(requestBinaryContentDto)); | ||
| } | ||
| } | ||
|
|
||
| RequestCreateMessageDto requestMessageDto = new RequestCreateMessageDto(content, channelId, userId, binaryContentIds); | ||
| return messageService.create(requestMessageDto); | ||
| } |
joonfluence
reviewed
Feb 14, 2026
Comment on lines
16
to
17
| private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy년 MM월 dd일 HH시 mm분 ss초") | ||
| .withZone(ZoneId.of("Asia/Seoul")); |
joonfluence
reviewed
Feb 14, 2026
Comment on lines
+1
to
+2
| .idea | ||
| *.ser No newline at end of file |
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.
요구사항
기본
[x] DiscodeitApplication의 테스트 로직은 삭제하세요.
[x] 지금까지 구현한 서비스 로직을 활용해 웹 API를 구현하세요. 이때 @RequestMapping만 사용해 구현해보세요.
[x] 웹 API의 예외를 전역으로 처리하세요.
API 테스트
[x] Postman을 활용해 컨트롤러를 테스트 하세요.
Postman API 테스트 결과를 다음과 같이 export하여 PR에 첨부해주세요.
Sprint 4.postman_collection.json
사용자 관리
[x] 사용자를 등록할 수 있다.
[x] 사용자 정보를 수정할 수 있다.
[x] 사용자를 삭제할 수 있다.
[x] 모든 사용자를 조회할 수 있다.
[x] 사용자의 온라인 상태를 업데이트할 수 있다.
권한 관리
[x] 사용자는 로그인할 수 있다.
채널 관리
[x] 공개 채널을 생성할 수 있다.
[x] 비공개 채널을 생성할 수 있다.
[x] 공개 채널의 정보를 수정할 수 있다.
[x] 채널을 삭제할 수 있다.
[x] 특정 사용자가 볼 수 있는 모든 채널 목록을 조회할 수 있다.
메시지 관리
[x] 메시지를 보낼 수 있다.
[x] 메시지를 수정할 수 있다.
[x] 메시지를 삭제할 수 있다.
[x] 특정 채널의 메시지 목록을 조회할 수 있다.
메시지 수신 정보 관리
[x] 특정 채널의 메시지 수신 정보를 생성할 수 있다.
[x] 특정 채널의 메시지 수신 정보를 수정할 수 있다.
[x] 특정 사용자의 메시지 수신 정보를 조회할 수 있다.
바이너리 파일 다운로드
[x] 바이너리 파일을 1개 또는 여러 개 조회할 수 있다.
심화
[x] 사용자 목록 조회, BinaryContent 파일 조회 API를 다음의 조건을 만족하도록 수정하세요.
[x] 사용자 목록 조회
[x] BinaryContent 파일 조회
[x] 다음의 파일을 활용하여 사용자 목록을 보여주는 화면을 서빙해보세요.
생성형 AI 활용
[x] 생성형 AI (Claude, ChatGPT 등)를 활용해서 위 이미지와 비슷한 화면을 생성 후 서빙해보세요.
주요 변경사항
스크린샷
API Test
생성형 AI 사용
멘토에게