From d4819e728d81b311621d41a92a69f5d26f1a9f70 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Tue, 02 Jul 2024 18:03:08 +0800
Subject: [PATCH] 逻辑

---
 src/main/java/cc/mrbird/febs/common/handler/GlobalExceptionHandler.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/common/handler/GlobalExceptionHandler.java b/src/main/java/cc/mrbird/febs/common/handler/GlobalExceptionHandler.java
index a2c6d06..23ccc72 100644
--- a/src/main/java/cc/mrbird/febs/common/handler/GlobalExceptionHandler.java
+++ b/src/main/java/cc/mrbird/febs/common/handler/GlobalExceptionHandler.java
@@ -1,6 +1,6 @@
 package cc.mrbird.febs.common.handler;
 
-import cc.mrbird.febs.common.configure.i18n.MessageSourceUtils;
+import cc.mrbird.febs.common.annotation.EncryptEnable;
 import cc.mrbird.febs.common.entity.FebsResponse;
 import cc.mrbird.febs.common.exception.FebsException;
 import cc.mrbird.febs.common.exception.FileDownloadException;
@@ -31,6 +31,7 @@
  * @author MrBird
  */
 @Slf4j
+@EncryptEnable
 @RestControllerAdvice
 @Order(value = Ordered.HIGHEST_PRECEDENCE)
 public class GlobalExceptionHandler {
@@ -38,12 +39,13 @@
     @ExceptionHandler(value = Exception.class)
     public FebsResponse handleException(Exception e) {
         log.error("系统内部异常,异常信息", e);
-        return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message(MessageSourceUtils.getString("system_error"));
+        return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message("数据升级中,请稍后");
     }
 
     @ExceptionHandler(value = FebsException.class)
     public FebsResponse handleFebsException(FebsException e) {
         return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message(e.getMessage());
+//        return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message("数据升级中,请稍后");
     }
 
     /**
@@ -114,7 +116,7 @@
     @ExceptionHandler(value = AuthenticationException.class)
     public FebsResponse handleAuthenticationException(AuthenticationException e) {
         log.error("AuthenticationException, {}", e.getMessage());
-        return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message(e.getMessage());
+        return new FebsResponse().code(HttpStatus.INTERNAL_SERVER_ERROR).message("数据升级中,请稍后");
     }
 
     @ExceptionHandler(value = AuthorizationException.class)

--
Gitblit v1.9.1