diff --git a/src/main/resources/modules/SpringBoot/java/frame/auth/Token.java b/src/main/resources/modules/SpringBoot/java/frame/auth/Token.java index 80263161..29b45a92 100644 --- a/src/main/resources/modules/SpringBoot/java/frame/auth/Token.java +++ b/src/main/resources/modules/SpringBoot/java/frame/auth/Token.java @@ -41,12 +41,6 @@ public class Token implements Serializable { private Set resSet = new HashSet<>(); public boolean hasRes(String res) { - for (String s : resSet) { - if (res.matches(s)) { - return true; - } - } - String[] profiles = LocalData.getEnvironment().getActiveProfiles(); for (String profile : profiles) { 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; }