@RestControllerAdvice(value="com.platform") public class RRExceptionHandler extends Object
Constructor and Description |
---|
RRExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
Object |
handleApiRRException(ApiRRException e) |
R |
handleAuthorizationException(org.apache.shiro.authz.AuthorizationException e) |
R |
handleDuplicateKeyException(org.springframework.dao.DuplicateKeyException e) |
R |
handleException(Exception e) |
R |
handleRRException(RRException e)
自定义异常
|
@ExceptionHandler(value=RRException.class) public R handleRRException(RRException e)
@ExceptionHandler(value=org.springframework.dao.DuplicateKeyException.class) public R handleDuplicateKeyException(org.springframework.dao.DuplicateKeyException e)
@ExceptionHandler(value=org.apache.shiro.authz.AuthorizationException.class) public R handleAuthorizationException(org.apache.shiro.authz.AuthorizationException e)
@ExceptionHandler(value=java.lang.Exception.class) public R handleException(Exception e)
@ExceptionHandler(value=ApiRRException.class) public Object handleApiRRException(ApiRRException e)
Copyright © 2021. All rights reserved.