diff --git a/src/main/java/cn/chjyj/szwh/Interceptor/ChInterceptor.java b/src/main/java/cn/chjyj/szwh/Interceptor/ChInterceptor.java index ba76ea1..41ee3ce 100644 --- a/src/main/java/cn/chjyj/szwh/Interceptor/ChInterceptor.java +++ b/src/main/java/cn/chjyj/szwh/Interceptor/ChInterceptor.java @@ -45,7 +45,7 @@ public class ChInterceptor implements HandlerInterceptor { //默认全部检查 else { // 执行认证 - if (StringUtils.isEmpty(token)) { + if (token==null || StringUtils.isBlank(token)) { throw new ChException("token为空,token为必须参数"); }else{ log.info("token正常");