|
25 | 25 | import me.chanjar.weixin.common.util.DataUtils; |
26 | 26 | import me.chanjar.weixin.common.util.RandomUtils; |
27 | 27 | import me.chanjar.weixin.common.util.crypto.SHA1; |
28 | | -import me.chanjar.weixin.common.util.http.RequestExecutor; |
29 | | -import me.chanjar.weixin.common.util.http.RequestHttp; |
30 | | -import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; |
31 | | -import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; |
32 | | -import me.chanjar.weixin.common.util.http.URIUtil; |
| 28 | +import me.chanjar.weixin.common.util.http.*; |
33 | 29 | import me.chanjar.weixin.common.util.json.GsonParser; |
34 | 30 | import me.chanjar.weixin.common.util.json.WxGsonBuilder; |
35 | 31 | import me.chanjar.weixin.mp.api.*; |
|
46 | 42 | import java.util.Map; |
47 | 43 | import java.util.concurrent.locks.Lock; |
48 | 44 |
|
49 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.CLEAR_QUOTA_URL; |
50 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.FETCH_SHORTEN_URL; |
51 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.GEN_SHORTEN_URL; |
52 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.GET_CALLBACK_IP_URL; |
53 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.GET_CURRENT_AUTOREPLY_INFO_URL; |
54 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.GET_TICKET_URL; |
55 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.NETCHECK_URL; |
56 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.QRCONNECT_URL; |
57 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.SEMANTIC_SEMPROXY_SEARCH_URL; |
58 | | -import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.SHORTURL_API_URL; |
| 45 | +import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Other.*; |
59 | 46 |
|
60 | 47 | /** |
61 | 48 | * 基础实现类. |
@@ -482,6 +469,10 @@ protected String extractAccessToken(String resultContent) throws WxErrorExceptio |
482 | 469 | @Override |
483 | 470 | public void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider) { |
484 | 471 | final String defaultMpId = wxConfigProvider.getAppId(); |
| 472 | + if (defaultMpId == null) { |
| 473 | + throw new WxRuntimeException("appid不能设置为null"); |
| 474 | + } |
| 475 | + |
485 | 476 | this.setMultiConfigStorages(ImmutableMap.of(defaultMpId, wxConfigProvider), defaultMpId); |
486 | 477 | } |
487 | 478 |
|
|
0 commit comments