Commit 62698c81 by 章家宝

feat: 登录验证不通过使用200而不使用401

1 parent 2e80391a
......@@ -100,7 +100,7 @@ public class LoginInterceptor implements HandlerInterceptor {
private void returnErrorResponse(HttpServletResponse response, String message) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
response.setStatus(HttpStatus.UNAUTHORIZED.value()); // 401状态码
response.setStatus(HttpStatus.OK.value()); // 401状态码
try (PrintWriter writer = response.getWriter()) {
BaseResp<Void> errorResponse = BaseResp.fail(ErrorCodeEnum.LOGIN_ERROR);
writer.write(JSON.toJSONString(errorResponse));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!