@ControllerAdvice @ResponseBody public class GlobalExceptionHandler extends Object
| 构造器和说明 |
|---|
GlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
apiExceptionHandler(javax.servlet.http.HttpServletRequest request,
ApiException exception) |
Object |
beansException(org.springframework.beans.BeansException exception) |
Object |
constraintViolationException(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request,
Exception exception) |
Object |
exceptionHandler(javax.servlet.http.HttpServletRequest request,
Exception ex) |
Object |
methodArgumentNotValidException(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request,
Exception exception) |
Object |
missingServletRequestParameterException(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request,
Exception exception) |
Object |
serializationExceptionException(org.springframework.beans.BeansException exception) |
Object |
servletException(javax.servlet.ServletException exception) |
@ExceptionHandler(value=ApiException.class) public Object apiExceptionHandler(javax.servlet.http.HttpServletRequest request, ApiException exception) throws Exception
Exception@ExceptionHandler(value=org.springframework.beans.BeansException.class) public Object beansException(org.springframework.beans.BeansException exception) throws Exception
Exception@ExceptionHandler(value=SerializationException.class) public Object serializationExceptionException(org.springframework.beans.BeansException exception) throws Exception
Exception@ExceptionHandler(value=javax.servlet.ServletException.class) public Object servletException(javax.servlet.ServletException exception) throws Exception
Exception@ExceptionHandler(value=org.springframework.web.bind.MissingServletRequestParameterException.class) public Object missingServletRequestParameterException(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, Exception exception) throws Exception
Exception@ExceptionHandler public Object exceptionHandler(javax.servlet.http.HttpServletRequest request, Exception ex)
@ExceptionHandler(value=org.springframework.web.bind.MethodArgumentNotValidException.class) public Object methodArgumentNotValidException(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, Exception exception) throws Exception
ExceptionCopyright © 2020. All rights reserved.