diff --git a/roncoo-education-app/roncoo-education-app-gateway/src/main/java/com/roncoo/education/app/gateway/filter/EduGlobalFilter.java b/roncoo-education-app/roncoo-education-app-gateway/src/main/java/com/roncoo/education/app/gateway/filter/EduGlobalFilter.java index 1f8b73c799be8b2d539096627f301dd52f50cc19..36291553d9398382ccae874eba41fd80761635aa 100644 --- a/roncoo-education-app/roncoo-education-app-gateway/src/main/java/com/roncoo/education/app/gateway/filter/EduGlobalFilter.java +++ b/roncoo-education-app/roncoo-education-app-gateway/src/main/java/com/roncoo/education/app/gateway/filter/EduGlobalFilter.java @@ -123,7 +123,7 @@ public class EduGlobalFilter implements GlobalFilter, Ordered { private Long getUserId(ServerHttpRequest request) { // 头部 String token = request.getHeaders().getFirst(Constants.TOKEN); - if (StringUtils.isEmpty(token)) { + if (!StringUtils.hasText(token)) { throw new BaseException("token不存在,请重新登录"); }