mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-11-01 03:25:35 +08:00 
			
		
		
		
	修复公众号proxy为空的bug,并发布临时版本2.1.2
This commit is contained in:
		
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							| @ -5,7 +5,7 @@ | |||||||
|   <modelVersion>4.0.0</modelVersion> |   <modelVersion>4.0.0</modelVersion> | ||||||
|   <groupId>com.github.binarywang</groupId> |   <groupId>com.github.binarywang</groupId> | ||||||
|   <artifactId>weixin-java-parent</artifactId> |   <artifactId>weixin-java-parent</artifactId> | ||||||
|   <version>2.1.1</version> |   <version>2.1.2</version> | ||||||
|   <packaging>pom</packaging> |   <packaging>pom</packaging> | ||||||
|   <name>WeiXin Java Tools - Parent</name> |   <name>WeiXin Java Tools - Parent</name> | ||||||
|   <description>微信公众号、企业号上级POM</description> |   <description>微信公众号、企业号上级POM</description> | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ | |||||||
|   <parent> |   <parent> | ||||||
|     <groupId>com.github.binarywang</groupId> |     <groupId>com.github.binarywang</groupId> | ||||||
|     <artifactId>weixin-java-parent</artifactId> |     <artifactId>weixin-java-parent</artifactId> | ||||||
|     <version>2.1.1</version> |     <version>2.1.2</version> | ||||||
|   </parent> |   </parent> | ||||||
|  |  | ||||||
|   <artifactId>weixin-java-common</artifactId> |   <artifactId>weixin-java-common</artifactId> | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>com.github.binarywang</groupId> |         <groupId>com.github.binarywang</groupId> | ||||||
|         <artifactId>weixin-java-parent</artifactId> |         <artifactId>weixin-java-parent</artifactId> | ||||||
|         <version>2.1.1</version> |         <version>2.1.2</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <artifactId>weixin-java-cp</artifactId> |     <artifactId>weixin-java-cp</artifactId> | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>com.github.binarywang</groupId> |         <groupId>com.github.binarywang</groupId> | ||||||
|         <artifactId>weixin-java-parent</artifactId> |         <artifactId>weixin-java-parent</artifactId> | ||||||
|         <version>2.1.1</version> |         <version>2.1.2</version> | ||||||
|     </parent> |     </parent> | ||||||
|     <artifactId>weixin-java-mp</artifactId> |     <artifactId>weixin-java-mp</artifactId> | ||||||
|     <name>WeiXin Java Tools - MP</name> |     <name>WeiXin Java Tools - MP</name> | ||||||
|  | |||||||
| @ -1,21 +1,7 @@ | |||||||
| package me.chanjar.weixin.mp.api.impl; | package me.chanjar.weixin.mp.api.impl; | ||||||
|  |  | ||||||
| import com.google.gson.JsonArray; | import java.io.IOException; | ||||||
| import com.google.gson.JsonElement; |  | ||||||
| import com.google.gson.JsonObject; |  | ||||||
| import com.google.gson.JsonParser; |  | ||||||
| import me.chanjar.weixin.common.bean.WxAccessToken; |  | ||||||
| import me.chanjar.weixin.common.bean.WxJsapiSignature; |  | ||||||
| import me.chanjar.weixin.common.bean.result.WxError; |  | ||||||
| import me.chanjar.weixin.common.exception.WxErrorException; |  | ||||||
| import me.chanjar.weixin.common.session.StandardSessionManager; |  | ||||||
| import me.chanjar.weixin.common.session.WxSessionManager; |  | ||||||
| import me.chanjar.weixin.common.util.RandomUtils; |  | ||||||
| import me.chanjar.weixin.common.util.crypto.SHA1; |  | ||||||
| import me.chanjar.weixin.common.util.http.*; |  | ||||||
| import me.chanjar.weixin.mp.api.*; |  | ||||||
| import me.chanjar.weixin.mp.bean.*; |  | ||||||
| import me.chanjar.weixin.mp.bean.result.*; |  | ||||||
| import org.apache.http.HttpHost; | import org.apache.http.HttpHost; | ||||||
| import org.apache.http.client.config.RequestConfig; | import org.apache.http.client.config.RequestConfig; | ||||||
| import org.apache.http.client.methods.CloseableHttpResponse; | import org.apache.http.client.methods.CloseableHttpResponse; | ||||||
| @ -27,7 +13,51 @@ import org.apache.http.impl.client.CloseableHttpClient; | |||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
|  |  | ||||||
| import java.io.IOException; | import com.google.gson.JsonArray; | ||||||
|  | import com.google.gson.JsonElement; | ||||||
|  | import com.google.gson.JsonObject; | ||||||
|  | import com.google.gson.JsonParser; | ||||||
|  |  | ||||||
|  | import me.chanjar.weixin.common.bean.WxAccessToken; | ||||||
|  | import me.chanjar.weixin.common.bean.WxJsapiSignature; | ||||||
|  | import me.chanjar.weixin.common.bean.result.WxError; | ||||||
|  | import me.chanjar.weixin.common.exception.WxErrorException; | ||||||
|  | import me.chanjar.weixin.common.session.StandardSessionManager; | ||||||
|  | import me.chanjar.weixin.common.session.WxSessionManager; | ||||||
|  | import me.chanjar.weixin.common.util.RandomUtils; | ||||||
|  | import me.chanjar.weixin.common.util.crypto.SHA1; | ||||||
|  | import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder; | ||||||
|  | import me.chanjar.weixin.common.util.http.DefaultApacheHttpClientBuilder; | ||||||
|  | import me.chanjar.weixin.common.util.http.RequestExecutor; | ||||||
|  | import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; | ||||||
|  | import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; | ||||||
|  | import me.chanjar.weixin.common.util.http.URIUtil; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpCardService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpConfigStorage; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpDataCubeService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpGroupService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpKefuService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpMaterialService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpMenuService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpPayService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpQrcodeService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpUserService; | ||||||
|  | import me.chanjar.weixin.mp.api.WxMpUserTagService; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpCustomMessage; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpIndustry; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpMassGroupMessage; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpMassNews; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpMassOpenIdsMessage; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpMassPreviewMessage; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpMassVideo; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpSemanticQuery; | ||||||
|  | import me.chanjar.weixin.mp.bean.WxMpTemplateMessage; | ||||||
|  | import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult; | ||||||
|  | import me.chanjar.weixin.mp.bean.result.WxMpMassUploadResult; | ||||||
|  | import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; | ||||||
|  | import me.chanjar.weixin.mp.bean.result.WxMpSemanticQueryResult; | ||||||
|  | import me.chanjar.weixin.mp.bean.result.WxMpUser; | ||||||
|  |  | ||||||
| public class WxMpServiceImpl implements WxMpService { | public class WxMpServiceImpl implements WxMpService { | ||||||
|  |  | ||||||
| @ -45,7 +75,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|    */ |    */ | ||||||
|   private final Object globalJsapiTicketRefreshLock = new Object(); |   private final Object globalJsapiTicketRefreshLock = new Object(); | ||||||
|  |  | ||||||
|   private WxMpConfigStorage wxMpConfigStorage; |   private WxMpConfigStorage configStorage; | ||||||
|    |    | ||||||
|   private WxMpKefuService kefuService = new WxMpKefuServiceImpl(this); |   private WxMpKefuService kefuService = new WxMpKefuServiceImpl(this); | ||||||
|  |  | ||||||
| @ -80,7 +110,8 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   @Override |   @Override | ||||||
|   public boolean checkSignature(String timestamp, String nonce, String signature) { |   public boolean checkSignature(String timestamp, String nonce, String signature) { | ||||||
|     try { |     try { | ||||||
|       return SHA1.gen(this.wxMpConfigStorage.getToken(), timestamp, nonce).equals(signature); |       return SHA1.gen(this.configStorage.getToken(), timestamp, nonce) | ||||||
|  |           .equals(signature); | ||||||
|     } catch (Exception e) { |     } catch (Exception e) { | ||||||
|       return false; |       return false; | ||||||
|     } |     } | ||||||
| @ -94,14 +125,14 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   @Override |   @Override | ||||||
|   public String getAccessToken(boolean forceRefresh) throws WxErrorException { |   public String getAccessToken(boolean forceRefresh) throws WxErrorException { | ||||||
|     if (forceRefresh) { |     if (forceRefresh) { | ||||||
|       this.wxMpConfigStorage.expireAccessToken(); |       this.configStorage.expireAccessToken(); | ||||||
|     } |     } | ||||||
|     if (this.wxMpConfigStorage.isAccessTokenExpired()) { |     if (this.configStorage.isAccessTokenExpired()) { | ||||||
|       synchronized (this.globalAccessTokenRefreshLock) { |       synchronized (this.globalAccessTokenRefreshLock) { | ||||||
|         if (this.wxMpConfigStorage.isAccessTokenExpired()) { |         if (this.configStorage.isAccessTokenExpired()) { | ||||||
|           String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential" + |           String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential" + | ||||||
|                   "&appid=" + this.wxMpConfigStorage.getAppId() + |               "&appid=" + this.configStorage.getAppId() + "&secret=" | ||||||
|                   "&secret=" + this.wxMpConfigStorage.getSecret(); |               + this.configStorage.getSecret(); | ||||||
|           try { |           try { | ||||||
|             HttpGet httpGet = new HttpGet(url); |             HttpGet httpGet = new HttpGet(url); | ||||||
|             if (this.httpProxy != null) { |             if (this.httpProxy != null) { | ||||||
| @ -115,7 +146,8 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|                 throw new WxErrorException(error); |                 throw new WxErrorException(error); | ||||||
|               } |               } | ||||||
|               WxAccessToken accessToken = WxAccessToken.fromJson(resultContent); |               WxAccessToken accessToken = WxAccessToken.fromJson(resultContent); | ||||||
|               this.wxMpConfigStorage.updateAccessToken(accessToken.getAccessToken(), accessToken.getExpiresIn()); |               this.configStorage.updateAccessToken(accessToken.getAccessToken(), | ||||||
|  |                   accessToken.getExpiresIn()); | ||||||
|             }finally { |             }finally { | ||||||
|               httpGet.releaseConnection(); |               httpGet.releaseConnection(); | ||||||
|             } |             } | ||||||
| @ -125,7 +157,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     return this.wxMpConfigStorage.getAccessToken(); |     return this.configStorage.getAccessToken(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
| @ -136,23 +168,23 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   @Override |   @Override | ||||||
|   public String getJsapiTicket(boolean forceRefresh) throws WxErrorException { |   public String getJsapiTicket(boolean forceRefresh) throws WxErrorException { | ||||||
|     if (forceRefresh) { |     if (forceRefresh) { | ||||||
|       this.wxMpConfigStorage.expireJsapiTicket(); |       this.configStorage.expireJsapiTicket(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (this.wxMpConfigStorage.isJsapiTicketExpired()) { |     if (this.configStorage.isJsapiTicketExpired()) { | ||||||
|       synchronized (this.globalJsapiTicketRefreshLock) { |       synchronized (this.globalJsapiTicketRefreshLock) { | ||||||
|         if (this.wxMpConfigStorage.isJsapiTicketExpired()) { |         if (this.configStorage.isJsapiTicketExpired()) { | ||||||
|           String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi"; |           String url = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi"; | ||||||
|           String responseContent = execute(new SimpleGetRequestExecutor(), url, null); |           String responseContent = execute(new SimpleGetRequestExecutor(), url, null); | ||||||
|           JsonElement tmpJsonElement = JSON_PARSER.parse(responseContent); |           JsonElement tmpJsonElement = JSON_PARSER.parse(responseContent); | ||||||
|           JsonObject tmpJsonObject = tmpJsonElement.getAsJsonObject(); |           JsonObject tmpJsonObject = tmpJsonElement.getAsJsonObject(); | ||||||
|           String jsapiTicket = tmpJsonObject.get("ticket").getAsString(); |           String jsapiTicket = tmpJsonObject.get("ticket").getAsString(); | ||||||
|           int expiresInSeconds = tmpJsonObject.get("expires_in").getAsInt(); |           int expiresInSeconds = tmpJsonObject.get("expires_in").getAsInt(); | ||||||
|           this.wxMpConfigStorage.updateJsapiTicket(jsapiTicket, expiresInSeconds); |           this.configStorage.updateJsapiTicket(jsapiTicket, expiresInSeconds); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     return this.wxMpConfigStorage.getJsapiTicket(); |     return this.configStorage.getJsapiTicket(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
| @ -163,7 +195,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|     String signature = SHA1.genWithAmple("jsapi_ticket=" + jsapiTicket, |     String signature = SHA1.genWithAmple("jsapi_ticket=" + jsapiTicket, | ||||||
|         "noncestr=" + noncestr, "timestamp=" + timestamp, "url=" + url); |         "noncestr=" + noncestr, "timestamp=" + timestamp, "url=" + url); | ||||||
|     WxJsapiSignature jsapiSignature = new WxJsapiSignature(); |     WxJsapiSignature jsapiSignature = new WxJsapiSignature(); | ||||||
|     jsapiSignature.setAppid(this.wxMpConfigStorage.getAppId()); |     jsapiSignature.setAppid(this.configStorage.getAppId()); | ||||||
|     jsapiSignature.setTimestamp(timestamp); |     jsapiSignature.setTimestamp(timestamp); | ||||||
|     jsapiSignature.setNoncestr(noncestr); |     jsapiSignature.setNoncestr(noncestr); | ||||||
|     jsapiSignature.setUrl(url); |     jsapiSignature.setUrl(url); | ||||||
| @ -264,7 +296,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   public String oauth2buildAuthorizationUrl(String redirectURI, String scope, String state) { |   public String oauth2buildAuthorizationUrl(String redirectURI, String scope, String state) { | ||||||
|     StringBuilder url = new StringBuilder(); |     StringBuilder url = new StringBuilder(); | ||||||
|     url.append("https://open.weixin.qq.com/connect/oauth2/authorize?"); |     url.append("https://open.weixin.qq.com/connect/oauth2/authorize?"); | ||||||
|     url.append("appid=").append(this.wxMpConfigStorage.getAppId()); |     url.append("appid=").append(this.configStorage.getAppId()); | ||||||
|     url.append("&redirect_uri=").append(URIUtil.encodeURIComponent(redirectURI)); |     url.append("&redirect_uri=").append(URIUtil.encodeURIComponent(redirectURI)); | ||||||
|     url.append("&response_type=code"); |     url.append("&response_type=code"); | ||||||
|     url.append("&scope=").append(scope); |     url.append("&scope=").append(scope); | ||||||
| @ -280,7 +312,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|       String state) { |       String state) { | ||||||
|     StringBuilder url = new StringBuilder(); |     StringBuilder url = new StringBuilder(); | ||||||
|     url.append("https://open.weixin.qq.com/connect/qrconnect?"); |     url.append("https://open.weixin.qq.com/connect/qrconnect?"); | ||||||
|     url.append("appid=").append(this.wxMpConfigStorage.getAppId()); |     url.append("appid=").append(this.configStorage.getAppId()); | ||||||
|     url.append("&redirect_uri=").append(URIUtil.encodeURIComponent(redirectURI)); |     url.append("&redirect_uri=").append(URIUtil.encodeURIComponent(redirectURI)); | ||||||
|     url.append("&response_type=code"); |     url.append("&response_type=code"); | ||||||
|     url.append("&scope=").append(scope); |     url.append("&scope=").append(scope); | ||||||
| @ -306,8 +338,8 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   public WxMpOAuth2AccessToken oauth2getAccessToken(String code) throws WxErrorException { |   public WxMpOAuth2AccessToken oauth2getAccessToken(String code) throws WxErrorException { | ||||||
|     StringBuilder url = new StringBuilder(); |     StringBuilder url = new StringBuilder(); | ||||||
|     url.append("https://api.weixin.qq.com/sns/oauth2/access_token?"); |     url.append("https://api.weixin.qq.com/sns/oauth2/access_token?"); | ||||||
|     url.append("appid=").append(this.wxMpConfigStorage.getAppId()); |     url.append("appid=").append(this.configStorage.getAppId()); | ||||||
|     url.append("&secret=").append(this.wxMpConfigStorage.getSecret()); |     url.append("&secret=").append(this.configStorage.getSecret()); | ||||||
|     url.append("&code=").append(code); |     url.append("&code=").append(code); | ||||||
|     url.append("&grant_type=authorization_code"); |     url.append("&grant_type=authorization_code"); | ||||||
|  |  | ||||||
| @ -318,7 +350,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   public WxMpOAuth2AccessToken oauth2refreshAccessToken(String refreshToken) throws WxErrorException { |   public WxMpOAuth2AccessToken oauth2refreshAccessToken(String refreshToken) throws WxErrorException { | ||||||
|     StringBuilder url = new StringBuilder(); |     StringBuilder url = new StringBuilder(); | ||||||
|     url.append("https://api.weixin.qq.com/sns/oauth2/refresh_token?"); |     url.append("https://api.weixin.qq.com/sns/oauth2/refresh_token?"); | ||||||
|     url.append("appid=").append(this.wxMpConfigStorage.getAppId()); |     url.append("appid=").append(this.configStorage.getAppId()); | ||||||
|     url.append("&grant_type=refresh_token"); |     url.append("&grant_type=refresh_token"); | ||||||
|     url.append("&refresh_token=").append(refreshToken); |     url.append("&refresh_token=").append(refreshToken); | ||||||
|  |  | ||||||
| @ -438,7 +470,7 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|        */ |        */ | ||||||
|       if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) { |       if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) { | ||||||
|         // 强制设置wxMpConfigStorage它的access token过期了,这样在下一次请求里就会刷新access token |         // 强制设置wxMpConfigStorage它的access token过期了,这样在下一次请求里就会刷新access token | ||||||
|         this.wxMpConfigStorage.expireAccessToken(); |         this.configStorage.expireAccessToken(); | ||||||
|         return execute(executor, uri, data); |         return execute(executor, uri, data); | ||||||
|       } |       } | ||||||
|       if (error.getErrorCode() != 0) { |       if (error.getErrorCode() != 0) { | ||||||
| @ -460,33 +492,37 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider) { |   public void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider) { | ||||||
|     this.wxMpConfigStorage = wxConfigProvider; |     this.configStorage = wxConfigProvider; | ||||||
|     this.initHttpClient(); |     this.initHttpClient(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void initHttpClient() { |   private void initHttpClient() { | ||||||
|     ApacheHttpClientBuilder apacheHttpClientBuilder = this.wxMpConfigStorage.getApacheHttpClientBuilder(); |     ApacheHttpClientBuilder apacheHttpClientBuilder = this.configStorage | ||||||
|  |         .getApacheHttpClientBuilder(); | ||||||
|     if (null == apacheHttpClientBuilder) { |     if (null == apacheHttpClientBuilder) { | ||||||
|       apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); |       apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     apacheHttpClientBuilder.httpProxyHost(this.wxMpConfigStorage.getHttpProxyHost()) |     apacheHttpClientBuilder.httpProxyHost(this.configStorage.getHttpProxyHost()) | ||||||
|       .httpProxyPort(this.wxMpConfigStorage.getHttpProxyPort()) |         .httpProxyPort(this.configStorage.getHttpProxyPort()) | ||||||
|       .httpProxyUsername(this.wxMpConfigStorage.getHttpProxyUsername()) |         .httpProxyUsername(this.configStorage.getHttpProxyUsername()) | ||||||
|       .httpProxyPassword(this.wxMpConfigStorage.getHttpProxyPassword()); |         .httpProxyPassword(this.configStorage.getHttpProxyPassword()); | ||||||
|  |  | ||||||
|     if (this.wxMpConfigStorage.getSSLContext() != null){ |     if (this.configStorage.getSSLContext() != null) { | ||||||
|       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( |       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( | ||||||
|           this.wxMpConfigStorage.getSSLContext(), new String[] { "TLSv1" }, null, new DefaultHostnameVerifier()); |           this.configStorage.getSSLContext(), new String[] { "TLSv1" }, null, | ||||||
|  |           new DefaultHostnameVerifier()); | ||||||
|       apacheHttpClientBuilder.sslConnectionSocketFactory(sslsf); |       apacheHttpClientBuilder.sslConnectionSocketFactory(sslsf); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     this.httpProxy = new HttpHost(this.configStorage.getHttpProxyHost(), | ||||||
|  |         this.configStorage.getHttpProxyPort()); | ||||||
|     this.httpClient = apacheHttpClientBuilder.build(); |     this.httpClient = apacheHttpClientBuilder.build(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public WxMpConfigStorage getWxMpConfigStorage() { |   public WxMpConfigStorage getWxMpConfigStorage() { | ||||||
|     return this.wxMpConfigStorage; |     return this.configStorage; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 BinaryWang
					BinaryWang