From af4a68d84318a65b2610dbc31544fcf1087035c3 Mon Sep 17 00:00:00 2001 From: wangbing Date: Thu, 23 Apr 2020 23:43:05 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: f235e8605d4b721556aaab1e5a8398c757c909d3 --- .../modules/SpringBoot/java/frame/auth/Token.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; }