From b6caf1feb22471df4b1ffd813219acc85da18fa3 Mon Sep 17 00:00:00 2001 From: Stephen Tang <835226532@qq.com> Date: Tue, 15 Sep 2020 21:11:51 +0800 Subject: [PATCH] =?UTF-8?q?fixbug=20=20BaseException=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/security/handler/GlobalExceptionHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java index 7e569d6f..d35ff718 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java @@ -15,7 +15,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult; /** * 全局异常处理器 - * + * * @author ruoyi */ @RestControllerAdvice @@ -29,7 +29,7 @@ public class GlobalExceptionHandler @ExceptionHandler(BaseException.class) public AjaxResult baseException(BaseException e) { - return AjaxResult.error(e.getMessage()); + return AjaxResult.error(e.getDefaultMessage()); } /** @@ -73,7 +73,7 @@ public class GlobalExceptionHandler String message = e.getBindingResult().getFieldError().getDefaultMessage(); return AjaxResult.error(message); } - + /** * 权限异常 */ @@ -82,7 +82,7 @@ public class GlobalExceptionHandler { return AjaxResult.error("没有权限,请联系管理员授权"); } - + /** * 演示模式异常 */