#1039 微信公众号接口地址域名部分进行可配置化 改造

This commit is contained in:
Binary Wang
2019-06-09 21:15:42 +08:00
parent 084ffcf8bb
commit af9b3a4529
16 changed files with 317 additions and 241 deletions

View File

@ -11,6 +11,7 @@ import cn.binarywang.wx.miniapp.config.WxMaConfig;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
import me.chanjar.weixin.mp.bean.WxMpHostConfig;
import me.chanjar.weixin.mp.enums.TicketType;
import me.chanjar.weixin.open.api.WxOpenConfigStorage;
import me.chanjar.weixin.open.bean.WxOpenAuthorizerAccessToken;
@ -543,10 +544,14 @@ public class WxOpenInMemoryConfigStorage implements WxOpenConfigStorage {
return wxOpenConfigStorage.getApacheHttpClientBuilder();
}
@Override
public boolean autoRefreshToken() {
return true;
}
@Override
public WxMpHostConfig getHostConfig() {
return null;
}
}
}

View File

@ -9,7 +9,7 @@ import me.chanjar.weixin.open.api.WxOpenComponentService;
/**
* @author <a href="https://github.com/007gzs">007</a>
*/
/* package */ class WxOpenMpServiceImpl extends WxMpServiceImpl {
/* package(无需对外暴露) */ class WxOpenMpServiceImpl extends WxMpServiceImpl {
private WxOpenComponentService wxOpenComponentService;
private WxMpConfigStorage wxMpConfigStorage;
private String appId;