diff --git a/cloud-common-wechat/src/main/java/com/cm/common/wechat/filter/WechatFilter.java b/cloud-common-wechat/src/main/java/com/cm/common/wechat/filter/WechatFilter.java index 4ef595f..86079cf 100644 --- a/cloud-common-wechat/src/main/java/com/cm/common/wechat/filter/WechatFilter.java +++ b/cloud-common-wechat/src/main/java/com/cm/common/wechat/filter/WechatFilter.java @@ -56,6 +56,14 @@ public class WechatFilter implements Filter { * 微信路由放行 */ private static final String WECHAT_ROUTE_RELEASE_URL = "/**/wechatroute/**/**release/**"; + /** + * 微信路由静态资源 + */ + private static final String WECHAT_ROUTE_STATIC_URL = "/**/wechatroute/static/**"; + /** + * 上传文件 + */ + private static final String WECHAT_ROUTE_HYBRID_URL = "/**/wechatroute/hybrid/**"; @Override public void init(FilterConfig filterConfig) throws ServletException { @@ -70,7 +78,9 @@ public class WechatFilter implements Filter { boolean isRelease = antPathMatcher.match(WECHAT_LOGIN_URL, requestUri) || antPathMatcher.match(WECHAT_RELEASE_URL, requestUri) || antPathMatcher.match(WECHAT_API_RELEASE_URL, requestUri) - || antPathMatcher.match(WECHAT_ROUTE_RELEASE_URL, requestUri); + || antPathMatcher.match(WECHAT_ROUTE_RELEASE_URL, requestUri) + || antPathMatcher.match(WECHAT_ROUTE_STATIC_URL, requestUri) + || antPathMatcher.match(WECHAT_ROUTE_HYBRID_URL, requestUri); if (isRelease) { filterChain.doFilter(request, response); return; diff --git a/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java b/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java index ea5381c..dc3219d 100644 --- a/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java +++ b/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java @@ -124,9 +124,10 @@ public class WechatOfficialAccountManager { WechatOfficialAccountAccessTokenForUser wechatOfficialAccountAccessTokenForUser = getUserAccessToken(code); WechatOfficialAccountUserInfo wechatOfficialAccountUserInfo = getUserInfo(wechatOfficialAccountAccessTokenForUser.getAccess_token(), wechatOfficialAccountAccessTokenForUser.getOpenid()); WechatOfficialAccountUser wechatOfficialAccountUser = new WechatOfficialAccountUser(); - // 绑定用户 | 登录 + LOG.debug("绑定用户 | 登录"); String wechatSignInfo = Base64.encodeBase64String(AesUtil.aesCommonEncoder("WECHAT_SIGN_INFO", new StringBuilder(wechatOfficialAccountAccessTokenForUser.getOpenid()).append("_WenG_").append(wechatOfficialAccountProperties.getAppId()).toString()).getBytes("UTF-8")); String token = getAppToken(wechatSignInfo); + LOG.debug("用户token:{}", token); wechatOfficialAccountUser.setToken(token); wechatOfficialAccountUser.setWechatOfficialAccountAccessTokenForUser(wechatOfficialAccountAccessTokenForUser); wechatOfficialAccountUser.setWechatOfficialAccountUserInfo(wechatOfficialAccountUserInfo);