Merge pull request #48 from SKYhuangjing/feature/wx-stable-accesstoken

使用 微信 稳定版 Access token, 避免 Austin 与 业务方使用同一 appId 时, 出现 token 互踢现象
pull/57/head
Java3y 1 year ago committed by GitHub
commit 85f3587b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -123,6 +123,7 @@ public class AccountUtils {
config.setAppId(officialAccount.getAppId()); config.setAppId(officialAccount.getAppId());
config.setSecret(officialAccount.getSecret()); config.setSecret(officialAccount.getSecret());
config.setToken(officialAccount.getToken()); config.setToken(officialAccount.getToken());
config.useStableAccessToken(true);
wxMpService.setWxMpConfigStorage(config); wxMpService.setWxMpConfigStorage(config);
return wxMpService; return wxMpService;
} }
@ -138,6 +139,7 @@ public class AccountUtils {
WxMaRedisBetterConfigImpl config = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps(), SendAccountConstant.MINI_PROGRAM_TOKEN_PREFIX); WxMaRedisBetterConfigImpl config = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps(), SendAccountConstant.MINI_PROGRAM_TOKEN_PREFIX);
config.setAppid(miniProgramAccount.getAppId()); config.setAppid(miniProgramAccount.getAppId());
config.setSecret(miniProgramAccount.getAppSecret()); config.setSecret(miniProgramAccount.getAppSecret());
config.useStableAccessToken(true);
wxMaService.setWxMaConfig(config); wxMaService.setWxMaConfig(config);
return wxMaService; return wxMaService;
} }

@ -38,7 +38,7 @@
<maven.compiler.source>${target.java.version}</maven.compiler.source> <maven.compiler.source>${target.java.version}</maven.compiler.source>
<maven.compiler.target>${target.java.version}</maven.compiler.target> <maven.compiler.target>${target.java.version}</maven.compiler.target>
<log4j.version>2.17.1</log4j.version> <log4j.version>2.17.1</log4j.version>
<weixin-java>4.3.0</weixin-java> <weixin-java>4.5.3.B</weixin-java>
</properties> </properties>
<dependencyManagement> <dependencyManagement>

Loading…
Cancel
Save