Inflearn brand logo image

Inflearn Community Q&A

unryeong's profile image
unryeong

asked

Spring-based REST API development

Handling Bad Requests

Errors와 BindingResult

Written on

·

274

1

Errors 와 BindingResult 중 무엇을 쓰는게 더 좋을까요?

rest-apijavaspring

Answer 2

4

whiteship님의 프로필 이미지
whiteship
Instructor

Errors가 더 상위 인터페이스이고 대부분의 경우엔 Errors를 써도 무방합니다.

BindingResult  API를 읽어보시고 그안에 있는 메소드가 필요한 경우에만 BindingResult를 쓰는게 좋겠습니다.
 https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/validation/BindingResult.html


0

unryeong님의 프로필 이미지
unryeong
Questioner

친절한 답변 감사합니다. 좋은 강의 만들어주셔서 감사합니다^^

unryeong's profile image
unryeong

asked

Ask a question