Former-commit-id: f235e8605d4b721556aaab1e5a8398c757c909d3
master
王兵 5 years ago
parent d572ed0814
commit af4a68d843

@ -41,12 +41,6 @@ public class Token implements Serializable {
private Set<String> resSet = new HashSet<>(); private Set<String> resSet = new HashSet<>();
public boolean hasRes(String res) { public boolean hasRes(String res) {
for (String s : resSet) {
if (res.matches(s)) {
return true;
}
}
String[] profiles = LocalData.getEnvironment().getActiveProfiles(); String[] profiles = LocalData.getEnvironment().getActiveProfiles();
for (String profile : profiles) { for (String profile : profiles) {
if (profile.contains("dev")) {//测试环境捕获资源 if (profile.contains("dev")) {//测试环境捕获资源
@ -68,6 +62,12 @@ public class Token implements Serializable {
} }
} }
for (String s : resSet) {
if (res.matches(s)) {
return true;
}
}
return false; return false;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.