|
@@ -32,4 +32,13 @@ public class GlobalExceptionHandler {
|
|
|
public Result businessExceptionHandler(BusinessException e) {
|
|
|
return Result.failure(e.getCode(), e.getMessage());
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理业务异常
|
|
|
+ */
|
|
|
+ @ResponseBody
|
|
|
+ @ExceptionHandler(value = com.fdkankan.ucenter.exception.BusinessException.class)
|
|
|
+ public Result businessExceptionHandler2(com.fdkankan.ucenter.exception.BusinessException e) {
|
|
|
+ return Result.failure(e.getCode(), e.getMessage());
|
|
|
+ }
|
|
|
}
|