-
Notifications
You must be signed in to change notification settings - Fork 0
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
[ohii] Chpater08_API 응답 통일 & 에러 핸들러 #35
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.
이번 주도 수고많으셨습니다~!
-> @ControllerAdvice와 동일한 예외 처리 역할을 수행하면서 @ResponseBody를 통해 응답으로 Json 객체를 리턴할 수 있음 | ||
-> @Controller 또는 @RestController이 붙은 컨트롤러에서 발생하는 예외를 전역적으로 처리할 수 있음 | ||
|
||
@ExceptionHandler : 특정 controller에서만 발생하는 예외만 처리하므로 여러 controller에서 발생하는 에러 처리 코드가 중복될 가능성이 있음 |
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.
수고하셨습니다!
2) 누락 방지 -> 주입 데이터가 누락되면 컴파일 오류 발생 | ||
3) fianl 키워드 -> 생성자 주입만 사용가능! 값이 설정되지 않는 오류를 컴파일 시점에서 막아줌 | ||
|
||
<@Autowired> |
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.
김영한님과의 콜라보,,,, 유익한정보 감사합니다!
최고!! 너무 수고하셨습니다💓💓
다음 9주차도 파이팅!!!🔥🔥 |
#️⃣ 연관된 이슈
#30
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트
🥸 미션
📌 주안점