-
Notifications
You must be signed in to change notification settings - Fork 2
3-1 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Chuseok22
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인 로직도 작성해주세용~~
그리구 application.yml 파일 ignore 시키는건 괜찮은데
.gitignore 파일 자체를 삭제하지 말아주세용~~
그나마 우리가 같은 버전을 사용하기에 충돌이 일어나지 않는데 .gradle, .idea 등등 이런 파일들은 자동으로 gitignore에 등록되어있어용 해당 파일들은 공유하지 않는게 좋아서 .gitignore 파일 자체를 삭제하면 안됩니당~~
| userRepository.save(user); | ||
| return userDto; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인 로직도 만들어주세용~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
하하 만드는 중
| 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("닉네임이 이미 존재합니다."); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외 처리 엄청 잘했어!!!
그런데 만약에 19~34번째 줄이 없을 경우 한번 테스트 해볼까???
- 아이디, 비밀번호, 닉네임이 null인경우 저장되는지
- 아이디와 닉네임이 중복 저정이 가능한지 한번 테스트해봅시당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트 했슴다
No description provided.