Kaynağa Gözat

恢复刘子麟修改的拦截器

夏文涛 1 yıl önce
ebeveyn
işleme
f6105d4d9e

+ 0 - 1
src/main/java/com/template/core/JwtAuthenticationInterceptor.java

@@ -6,7 +6,6 @@ import com.template.annotation.PassToken;
 import com.template.common.result.ResponseStatusEnum;
 import com.template.common.result.ResponseStatusEnum;
 import com.template.common.utils.JWTUtil;
 import com.template.common.utils.JWTUtil;
 import org.json.JSONObject;
 import org.json.JSONObject;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.servlet.HandlerInterceptor;
 import org.springframework.web.servlet.HandlerInterceptor;

+ 1 - 1
src/main/java/com/template/core/JwtlnterceptorConfig.java

@@ -14,7 +14,7 @@ public class JwtlnterceptorConfig implements WebMvcConfigurer {
         //目前测试下来 使用 /**所有的话,response.sendError浏览器获取不到响应的信息
         //目前测试下来 使用 /**所有的话,response.sendError浏览器获取不到响应的信息
         //默认拦截所有路径
         //默认拦截所有路径
         registry.addInterceptor(authenticationInterceptor())
         registry.addInterceptor(authenticationInterceptor())
-                .addPathPatterns("/api0/**");
+                .addPathPatterns("/api/**");
         //endregion
         //endregion
     }
     }