-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: 빈 쪽지 검증 추가 #540
feat: 빈 쪽지 검증 추가 #540
Conversation
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.
굳이네요!!
별다른 RC를 드릴게 없어서 바로 어푸루부 할게요!!
@@ -28,7 +28,8 @@ public ResponseEntity<ExceptionResponse> handleBaseException(final BaseException | |||
@ExceptionHandler({ | |||
HttpMessageNotReadableException.class, | |||
MethodArgumentNotValidException.class, | |||
HttpMediaTypeNotSupportedException.class}) | |||
HttpMediaTypeNotSupportedException.class, | |||
MethodArgumentNotValidException.class}) |
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.
@@ -34,7 +36,7 @@ public LetterController(final LetterService letterService) { | |||
|
|||
@PostMapping | |||
public ResponseEntity<LetterResponse> createLetter(@Auth final PlayerRequest playerRequest, | |||
@RequestBody final LetterRequest letterRequest) { | |||
@Valid @RequestBody final LetterRequest letterRequest) { |
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.
P5:
저도 해당 부분에 @Valid를 사용하는 것에 대해서 매우 동의합니다.
https://mangkyu.tistory.com/174
혹시나 해서 @Valid와 @validated의 차이도 인지하고 있으면 좋을 것 같아요!!
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.
루카 좋은 자료 감사합니당
|
||
@ParameterizedTest | ||
@ValueSource(strings = {"", " "}) | ||
void 쪽지_등록_요청시_쪽지의_내용이_blank이면_예외가_발생한다(String message) { |
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.
이레! 빈칸테스크 가져가주셧군요 감사합니다~!
MethodArgumentTypeMismatchException 이거 분노포인트 인정
특별히 수정할 부분없어서 바로 approve하겟습니다~!
@@ -34,7 +36,7 @@ public LetterController(final LetterService letterService) { | |||
|
|||
@PostMapping | |||
public ResponseEntity<LetterResponse> createLetter(@Auth final PlayerRequest playerRequest, | |||
@RequestBody final LetterRequest letterRequest) { | |||
@Valid @RequestBody final LetterRequest letterRequest) { |
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.
루카 좋은 자료 감사합니당
|
||
|
||
@ParameterizedTest | ||
@ValueSource(strings = {"", " "}) | ||
void 쪽지_등록_요청시_쪽지의_내용이_blank이면_예외가_발생한다(String message) { |
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.
이레짱 꼼꼼쓰
@@ -28,7 +28,8 @@ public ResponseEntity<ExceptionResponse> handleBaseException(final BaseException | |||
@ExceptionHandler({ | |||
HttpMessageNotReadableException.class, | |||
MethodArgumentNotValidException.class, | |||
HttpMediaTypeNotSupportedException.class}) | |||
HttpMediaTypeNotSupportedException.class, | |||
MethodArgumentNotValidException.class}) |
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.
p3: @Valid가 던지는 에러가 MethodArgumentNotValidException 인데 지금 중복이네요! 하나지워도 될것같아요!
📌 관련 이슈
PR과 연관된 이슈의 번호를 작성해주세요.
closed #527
🛠️ 작업 내용
PR에서 작업한 주요 내용을 적어주세요.
⏳ 작업 시간
추정 시간: 30분
실제 시간: 30분
MethodArgumentTypeMismatchException 때문에 삽질 2시간 추가..