feat:[REQ-3282] 增加异常处理类
This commit is contained in:
parent
59cd1feb34
commit
5ed580c89e
@ -37,7 +37,7 @@ public class ExceptionControllerAdvice {
|
|||||||
*/
|
*/
|
||||||
@ExceptionHandler(BusinessException.class)
|
@ExceptionHandler(BusinessException.class)
|
||||||
public ApiResult<?> exceptionHandler(BusinessException ex) {
|
public ApiResult<?> exceptionHandler(BusinessException ex) {
|
||||||
log.error("业务异常", ex);
|
log.warn("业务异常", ex);
|
||||||
return ApiResult.error(ex.getErrorCode(), extractMessage(ex));
|
return ApiResult.error(ex.getErrorCode(), extractMessage(ex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user