503
This commit is contained in:
@@ -8,7 +8,8 @@ public enum HttpStatusCodeEnum {
|
||||
BAD_REQUEST_DECRYPT_ERROR(4002,"加密参数解密失败"),
|
||||
UN_AUTHORIZED(401,"请求未被授权"),
|
||||
SERVER_ERROR(500,"服务器内部错误"),
|
||||
SERVER_FORBID(403,"请求频繁");
|
||||
SERVER_FORBID(403,"请求频繁"),
|
||||
UPGRADE(503,"服务升级中");
|
||||
|
||||
private final int code;
|
||||
private final String msg;
|
||||
|
||||
+3
-2
@@ -32,10 +32,11 @@ public class FangjiaOpenExceptionHandler implements ExceptionHandler {
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
context.getResponse().setStatus(500);
|
||||
// 临时改,后面还原 TODO
|
||||
context.getResponse().setStatus(503);
|
||||
context.getResponse().setCharacterEncoding("UTF-8");
|
||||
context.getResponse().setContentType("application/json;charset=UTF-8");
|
||||
context.getResponse().getWriter().println("{\"code\":500, \"msg\":\"服务升级中...\"}");
|
||||
context.getResponse().getWriter().println("{\"code\":503, \"msg\":\"服务升级中\"}");
|
||||
}
|
||||
|
||||
public static String getLocalHostIP() {
|
||||
|
||||
Reference in New Issue
Block a user