public abstract class BaseExceptionHandler extends Object
Constructor and Description |
---|
BaseExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handleConstructorException(javax.servlet.http.HttpServletResponse response,
org.yaml.snakeyaml.constructor.ConstructorException e) |
cn.jiangzeyin.common.JsonMessage<String> |
handleHttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException e) |
cn.jiangzeyin.common.JsonMessage<String> |
handleHttpRequestMethodNotSupportedException(org.springframework.web.HttpRequestMethodNotSupportedException e) |
void |
handleMaxUploadSizeExceededException(javax.servlet.http.HttpServletResponse response,
org.springframework.web.multipart.MaxUploadSizeExceededException e)
上传文件大小超出限制
|
void |
handleNoHandlerFoundException(javax.servlet.http.HttpServletResponse response,
org.springframework.web.servlet.NoHandlerFoundException e) |
void |
handleScannerException(javax.servlet.http.HttpServletResponse response,
org.yaml.snakeyaml.scanner.ScannerException e) |
@ExceptionHandler(value={org.springframework.http.converter.HttpMessageNotReadableException.class,org.springframework.http.converter.HttpMessageConversionException.class}) @ResponseBody public cn.jiangzeyin.common.JsonMessage<String> handleHttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException e)
@ExceptionHandler(value={org.springframework.web.HttpRequestMethodNotSupportedException.class,org.springframework.web.HttpMediaTypeNotSupportedException.class}) @ResponseBody public cn.jiangzeyin.common.JsonMessage<String> handleHttpRequestMethodNotSupportedException(org.springframework.web.HttpRequestMethodNotSupportedException e)
@ExceptionHandler(value=org.springframework.web.servlet.NoHandlerFoundException.class) public void handleNoHandlerFoundException(javax.servlet.http.HttpServletResponse response, org.springframework.web.servlet.NoHandlerFoundException e)
@ExceptionHandler(value=org.springframework.web.multipart.MaxUploadSizeExceededException.class) public void handleMaxUploadSizeExceededException(javax.servlet.http.HttpServletResponse response, org.springframework.web.multipart.MaxUploadSizeExceededException e)
response
- 响应e
- 异常@ExceptionHandler(value=org.yaml.snakeyaml.constructor.ConstructorException.class) public void handleConstructorException(javax.servlet.http.HttpServletResponse response, org.yaml.snakeyaml.constructor.ConstructorException e)
@ExceptionHandler(value=org.yaml.snakeyaml.scanner.ScannerException.class) public void handleScannerException(javax.servlet.http.HttpServletResponse response, org.yaml.snakeyaml.scanner.ScannerException e)
Copyright © 2017–2022. All rights reserved.