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.
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
[2단계 - 웹 자동차 경주] 제이(이재윤) 미션 제출합니다. #103
[2단계 - 웹 자동차 경주] 제이(이재윤) 미션 제출합니다. #103
Changes from 15 commits
3f32c55
3e5a7b7
51ff720
94431bc
9ddcf23
fad9124
f4ca361
290166e
7f42ead
1c20cec
7b6e1df
968e0e4
abb5763
4366e3e
b8b9d97
197ad1a
54d2e80
8ef2ef4
a0260f5
5f7f343
53fbec3
08e605f
beca51d
c2e063e
39e5cd1
0dd122b
8f340b9
583b3fb
8c0736e
b7d055c
a2125d5
6782237
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
@Valid
를 사용해주셨네요! 어떤 장단점이 있었나요?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.
@Valid
의 장점은 다음과 같습니다.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.
좋네요 👍🏻 여기서 조금 더 보완해드리자면,
편리한 점이 있어도 웹 요청에 한정해서 비교적 간단한 검증만 이루어져야하고, 핵심 도메인에 대한 검증까지 이를 대체하려고 하면 안됩니다. 복잡한 도메인 로직을 타기 전에 간단한 검증을 도와주는 장치이지 비즈니스 로직을 대체하는 장치가 아니라는 점이 중요합니다 🙂
이는 좋게 작용할 여지도 있다고 생각해요. 잘못된 요청에 대해선 일괄로 가벼운 처리와 4xx 응답 코드를 던져주는처리를 할 수 있고, 또 커스텀 예외가 필요하다면
MethodArgumentNotValidException
을 상속받는 커스텀 예외를 만들어서 처리할 수도 있을 것 같네요!