소스 검색

#324: 修复分布式刷新access_token冲突问题

master
Nick Wong 7 년 전
committed by Binary Wang
부모
커밋
b79370ac60
1개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. +1
    -6
      weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceApacheHttpClientImpl.java

+ 1
- 6
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceApacheHttpClientImpl.java 파일 보기

@@ -65,12 +65,7 @@ public class WxMpServiceApacheHttpClientImpl extends WxMpServiceAbstractImpl<Clo
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
try {
lock.lock();

if (forceRefresh) {
this.getWxMpConfigStorage().expireAccessToken();
}

if (this.getWxMpConfigStorage().isAccessTokenExpired()) {
if (this.getWxMpConfigStorage().isAccessTokenExpired() || forceRefresh) {
String url = String.format(WxMpService.GET_ACCESS_TOKEN_URL,
this.getWxMpConfigStorage().getAppId(), this.getWxMpConfigStorage().getSecret());
try {


불러오는 중...
취소
저장