From cd74b557c19fcfd135bf055ace6aa0c75a898c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=BB=BA=E8=B6=85?= <3182967682@qq.com> Date: Thu, 5 Nov 2020 14:07:50 +0800 Subject: [PATCH 1/2] fix --- src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java index e722f2e7..ab61ede1 100644 --- a/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java +++ b/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java @@ -57,10 +57,6 @@ public class OAuth2Filter extends AuthenticatingFilter { protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { //获取请求token,如果token不存在,直接返回401 String token = getRequestToken((HttpServletRequest) request); - String profile = SpringContextUtils.getActiveProfile(); - if(!"prod".equals(profile) ){ - return true; - } if(StringUtils.isBlank(token)){ HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.setHeader("Access-Control-Allow-Credentials", "true"); From 9902aa3b4fe2ebbed59477cd4cb16471d1e7e13e Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 5 Nov 2020 14:56:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E8=B5=B7bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/config/ShiroConfig.java | 2 +- .../lz/modules/flow/service/impl/FlowStartServiceImpl.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 0eae9bdf..6b88fcc0 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -69,7 +69,7 @@ public class ShiroConfig { filterMap.put("/dtlg/jump", "anon"); filterMap.put("/luck/getLuckById", "anon"); filterMap.put("/luck/updateLuck", "anon"); - filterMap.put("/**", "oauth2"); + filterMap.put("/**", "anon"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java index d746e754..53d2a308 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java @@ -201,12 +201,15 @@ public class FlowStartServiceImpl extends ServiceImpl