java.lang.Object
com.feiniaojin.gracefulresponse.advice.ValidationExceptionAdvice
@ControllerAdvice
@Order(100)
public class ValidationExceptionAdvice
extends Object
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ValidationExceptionAdvice
public ValidationExceptionAdvice()
-
Method Details
-
exceptionHandler
@ExceptionHandler({org.springframework.validation.BindException.class,jakarta.validation.ValidationException.class,org.springframework.web.bind.MethodArgumentNotValidException.class})
@ResponseBody
public Response exceptionHandler(Exception e)
throws Exception
- Throws:
Exception