feat:(feature/REQ-3581) 增加BusinessException异常拦截解析

This commit is contained in:
李龙 2025-02-21 11:04:19 +08:00
parent 1a484c2c2d
commit 2dac672232

View File

@ -60,4 +60,9 @@ public class ExceptionAdviceHandler {
return ApiResult.err(objectErrorDefaultMessage); return ApiResult.err(objectErrorDefaultMessage);
} }
@ExceptionHandler(cn.axzo.foundation.exception.BusinessException.class)
public ApiResult<Void> businessExceptionHandler(cn.axzo.foundation.exception.BusinessException e){
log.warn("业务异常", e);
return ApiResult.err(e.getErrorMsg());
}
} }