类的使用
org.springframework.web.bind.MethodArgumentNotValidException
使用MethodArgumentNotValidException的程序包 程序包 说明 org.springframework.web.servlet.mvc.method.annotation MVC infrastructure for annotation-based handler method processing, building on theorg.springframework.web.method.annotation
package.org.springframework.web.servlet.mvc.support Support package for MVC controllers.org.springframework.web.servlet.mvc.method.annotation中MethodArgumentNotValidException的使用
参数类型为MethodArgumentNotValidException的org.springframework.web.servlet.mvc.method.annotation中的方法 修饰符和类型 方法 说明 protected ResponseEntity<Object>
ResponseEntityExceptionHandler. handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request)
Customize the response for MethodArgumentNotValidException.org.springframework.web.servlet.mvc.support中MethodArgumentNotValidException的使用
参数类型为MethodArgumentNotValidException的org.springframework.web.servlet.mvc.support中的方法 修饰符和类型 方法 说明 protected ModelAndView
DefaultHandlerExceptionResolver. handleMethodArgumentNotValidException(MethodArgumentNotValidException ex, HttpServletRequest request, HttpServletResponse response, Object handler)
Handle the case where an argument annotated with@Valid
such as anRequestBody
orRequestPart
argument fails validation.