登录过滤器

This commit is contained in:
2024-05-15 09:42:42 +08:00
parent 6de9614473
commit 0ebfa2795d
4 changed files with 72 additions and 61 deletions

View File

@@ -34,21 +34,22 @@ public class LoginFilter implements Filter {
*/
private static final List<String> NOT_LOGIN_URL = Arrays.asList(
// 忽略静态资源
// "css/**",
// "js/**",
// "cashierService/phoneValidateCode",//验证码
// "cashierService/tbPlatformDict",//获取菜单
// "cashierService/location/**",//高德 获取行政区域
// "cashierService/home/homePageUp",//首页上半
// "cashierService/home",//首页
//
// "cashierService/distirict/**",//首页其它接口
// "cashierService/login/**",//登录部分接口不校验
// "cashierService/notify/**",//登录部分接口不校验
// "cashierService/product/queryShopIdByTableCode",
// "cashierService/product/queryProduct",
// "cashierService/product/productInfo",
// "notify/**"//登录部分接口不校验
"css/**",
"js/**",
"cashierService/websocket/table/**",//websocket
"cashierService/phoneValidateCode",//验证码
"cashierService/tbPlatformDict",//获取菜单
"cashierService/location/**",//高德 获取行政区域
"cashierService/home/homePageUp",//首页上半
"cashierService/home",//首页
"cashierService/distirict/**",//首页其它接口
"cashierService/login/**",//登录部分接口不校验
"cashierService/notify/**",//登录部分接口不校验
"cashierService/product/queryShopIdByTableCode",
"cashierService/product/queryProduct",
"cashierService/product/productInfo",
"notify/**"//登录部分接口不校验
);
@Autowired
@@ -72,7 +73,7 @@ public class LoginFilter implements Filter {
String url = request.getRequestURI();
// 不需要授权的接口直接访问的地址
if (!containsUrl(NOT_LOGIN_URL, url)) {
if (containsUrl(NOT_LOGIN_URL, url)) {
chain.doFilter(req, resp);
return;
}