@RestControllerAdvice
public class JeecgBootExceptionHandler
extends java.lang.Object
构造器和说明 |
---|
JeecgBootExceptionHandler() |
限定符和类型 | 方法和说明 |
---|---|
Result<?> |
handleAuthorizationException(org.apache.shiro.authz.AuthorizationException e) |
Result<?> |
handleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException e) |
Result<?> |
handleDuplicateKeyException(org.springframework.dao.DuplicateKeyException e) |
Result<?> |
handleException(java.lang.Exception e) |
Result<?> |
handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException e)
spring默认上传大小100MB 超出大小捕获异常MaxUploadSizeExceededException
|
Result<?> |
handlePoolException(org.springframework.data.redis.connection.PoolException e) |
Result<?> |
handlerNoFoundException(java.lang.Exception e) |
Result<?> |
handleRRException(JeecgBootException e)
处理自定义异常
|
Result<?> |
HttpRequestMethodNotSupportedException(org.springframework.web.HttpRequestMethodNotSupportedException e) |
@ExceptionHandler(value=JeecgBootException.class) public Result<?> handleRRException(JeecgBootException e)
@ExceptionHandler(value=org.springframework.web.servlet.NoHandlerFoundException.class) public Result<?> handlerNoFoundException(java.lang.Exception e)
@ExceptionHandler(value=org.springframework.dao.DuplicateKeyException.class) public Result<?> handleDuplicateKeyException(org.springframework.dao.DuplicateKeyException e)
@ExceptionHandler(value={org.apache.shiro.authz.UnauthorizedException.class,org.apache.shiro.authz.AuthorizationException.class}) public Result<?> handleAuthorizationException(org.apache.shiro.authz.AuthorizationException e)
@ExceptionHandler(value=java.lang.Exception.class) public Result<?> handleException(java.lang.Exception e)
@ExceptionHandler(value=org.springframework.web.HttpRequestMethodNotSupportedException.class) public Result<?> HttpRequestMethodNotSupportedException(org.springframework.web.HttpRequestMethodNotSupportedException e)
e
- @ExceptionHandler(value=org.springframework.web.multipart.MaxUploadSizeExceededException.class) public Result<?> handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException e)
@ExceptionHandler(value=org.springframework.dao.DataIntegrityViolationException.class) public Result<?> handleDataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException e)
@ExceptionHandler(value=org.springframework.data.redis.connection.PoolException.class) public Result<?> handlePoolException(org.springframework.data.redis.connection.PoolException e)