Conversation
Chuseok22
requested changes
Oct 29, 2024
Member
Chuseok22
left a comment
There was a problem hiding this comment.
로그인 로직도 작성해주세용~~
그리구 application.yml 파일 ignore 시키는건 괜찮은데
.gitignore 파일 자체를 삭제하지 말아주세용~~
그나마 우리가 같은 버전을 사용하기에 충돌이 일어나지 않는데 .gradle, .idea 등등 이런 파일들은 자동으로 gitignore에 등록되어있어용 해당 파일들은 공유하지 않는게 좋아서 .gitignore 파일 자체를 삭제하면 안됩니당~~
| userRepository.save(user); | ||
| return userDto; | ||
| } | ||
|
|
Comment on lines
+19
to
+35
| if (userDto.getUsername() == null || userDto.getUsername().isEmpty()) { | ||
| throw new RuntimeException("아이디를 입력해 주세요."); | ||
| } | ||
| if (userDto.getPassword() == null || userDto.getPassword().isEmpty()) { | ||
| throw new RuntimeException("비밀번호를 입력해 주세요."); | ||
| } | ||
| if (userDto.getNickname() == null || userDto.getNickname().isEmpty()) { | ||
| throw new RuntimeException("닉네임을 입력해 주세요."); | ||
| } | ||
|
|
||
| if (userRepository.existsByUsername(userDto.getUsername())) { | ||
| throw new RuntimeException("아이디가 이미 존재합니다."); | ||
| } | ||
| if (userRepository.existsByNickname(userDto.getNickname())) { | ||
| throw new RuntimeException("닉네임이 이미 존재합니다."); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
예외 처리 엄청 잘했어!!!
그런데 만약에 19~34번째 줄이 없을 경우 한번 테스트 해볼까???
- 아이디, 비밀번호, 닉네임이 null인경우 저장되는지
- 아이디와 닉네임이 중복 저정이 가능한지 한번 테스트해봅시당
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.
No description provided.