We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a219035 commit b87ec9aCopy full SHA for b87ec9a
weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaServiceImpl.java
@@ -116,6 +116,10 @@ public String getAccessToken(boolean forceRefresh) throws WxErrorException {
116
Lock lock = this.getWxMaConfig().getAccessTokenLock();
117
lock.lock();
118
try {
119
+ if (!this.getWxMaConfig().isAccessTokenExpired() && !forceRefresh) {
120
+ return this.getWxMaConfig().getAccessToken();
121
+ }
122
+
123
String url = String.format(WxMaService.GET_ACCESS_TOKEN_URL, this.getWxMaConfig().getAppid(),
124
this.getWxMaConfig().getSecret());
125
0 commit comments