@RestControllerAdvice public class CommonExceptionAdviceHandler extends Object
| 构造器和说明 |
|---|
CommonExceptionAdviceHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.http.ResponseEntity<?> |
exceptionHandler(javax.servlet.http.HttpServletRequest request,
Throwable ex) |
Map<String,Object> |
handleBindException(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException bindException) |
Map<String,Object> |
handleBindException(javax.servlet.http.HttpServletRequest request,
javax.validation.ConstraintViolationException bindException) |
Map<String,Object> |
handleBindException(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.MethodArgumentNotValidException bindException) |
@ExceptionHandler(value=java.lang.Throwable.class) public org.springframework.http.ResponseEntity<?> exceptionHandler(javax.servlet.http.HttpServletRequest request, Throwable ex)
@ResponseStatus(code=BAD_REQUEST) @ExceptionHandler(value=org.springframework.validation.BindException.class) public Map<String,Object> handleBindException(javax.servlet.http.HttpServletRequest request, org.springframework.validation.BindException bindException) throws IOException
IOException@ResponseStatus(code=BAD_REQUEST) @ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public Map<String,Object> handleBindException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MethodArgumentNotValidException bindException) throws IOException
IOException@ResponseStatus(code=BAD_REQUEST) @ExceptionHandler(value=javax.validation.ConstraintViolationException.class) public Map<String,Object> handleBindException(javax.servlet.http.HttpServletRequest request, javax.validation.ConstraintViolationException bindException) throws IOException
IOExceptionCopyright © 2019. All rights reserved.