Explorar el Código

去除API堆栈监控

leon hace 4 años
padre
commit
02953edd3d
Se han modificado 1 ficheros con 17 adiciones y 17 borrados
  1. 17 17
      src/main/java/com/mokamrp/privates/config/ApiPanic.java

+ 17 - 17
src/main/java/com/mokamrp/privates/config/ApiPanic.java

@@ -6,20 +6,20 @@ import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.ControllerAdvice;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 
-@ControllerAdvice
-public class ApiPanic {
-    private final String feishu = "https://open.feishu.cn/open-apis/bot/v2/hook/538d8993-e23a-4836-863c-05515b41160e";
-    @Value("${spring.profiles.active}")
-    private String env;
-
-    @ExceptionHandler(value = Exception.class)
-    public String exceptionHandler(Exception e) {
-        if (env.equals("prod")) {
-            //.正式环境捕获API异常 推送到飞书
-            if (e.getMessage() != null){
-                Cmd.sendFeishuMsg(feishu, "[moka-private]:api panic " + e);
-            }
-        }
-        return e.getMessage();
-    }
-}
+//@ControllerAdvice
+//public class ApiPanic {
+//    private final String feishu = "https://open.feishu.cn/open-apis/bot/v2/hook/538d8993-e23a-4836-863c-05515b41160e";
+//    @Value("${spring.profiles.active}")
+//    private String env;
+//
+//    @ExceptionHandler(value = Exception.class)
+//    public String exceptionHandler(Exception e) {
+//        if (env.equals("prod")) {
+//            //.正式环境捕获API异常 推送到飞书
+//            if (e.getMessage() != null){
+//                Cmd.sendFeishuMsg(feishu, "[moka-private]:api panic " + e);
+//            }
+//        }
+//        return e.getMessage();
+//    }
+//}