BindException thrown instead of MethodArgumentNotValidException in REST application
问题 I have a simple Spring Rest Controller with some validation. My understanding is that validation failures would throw a MethodArgumentNotValidException. However, my code throws a BindException instead. In debug messages, I also see the app returning a null ModelAndView. Why would a Rest Controller throw BindException or return a null ModelAndView? Note: I am testing my web application using curl and making an HTTP POST curl -X POST http://localhost:8080/tasks I am intentionally omitting the