perf: 调整token校验
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.tiesheng.login.config.token;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.tiesheng.annotation.token.TokenIgnore;
|
||||
@@ -55,12 +54,12 @@ public class TsTokenAspect {
|
||||
String[] ignorePaths = tsTokenConfig.getIgnorePaths();
|
||||
if (ObjUtil.isNotEmpty(ignorePaths)) {
|
||||
for (String path : ignorePaths) {
|
||||
if (path.contains("/**")) {
|
||||
path = path.replace("/**", "");
|
||||
if (StrUtil.startWith(requestURI, path)) {
|
||||
return;
|
||||
}
|
||||
if (path.contains("/**") &&
|
||||
StrUtil.startWith(requestURI, path.replace("/**", ""))) {
|
||||
// 通配路径
|
||||
return;
|
||||
} else if (requestURI.equals(path)) {
|
||||
// 完整路径
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user