mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	replace this.wxMpConfigStorage with this.getWxMpConfigStorage() #155
This commit is contained in:
		| @ -420,26 +420,19 @@ public class WxMpServiceImpl implements WxMpService { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void initHttpClient() { |   private void initHttpClient() { | ||||||
|     ApacheHttpClientBuilder apacheHttpClientBuilder = this.wxMpConfigStorage |     WxMpConfigStorage configStorage = this.getWxMpConfigStorage(); | ||||||
|       .getApacheHttpClientBuilder(); |     ApacheHttpClientBuilder apacheHttpClientBuilder = configStorage.getApacheHttpClientBuilder(); | ||||||
|     if (null == apacheHttpClientBuilder) { |     if (null == apacheHttpClientBuilder) { | ||||||
|       apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); |       apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     apacheHttpClientBuilder.httpProxyHost(this.getWxMpConfigStorage().getHttpProxyHost()) |     apacheHttpClientBuilder.httpProxyHost(configStorage.getHttpProxyHost()) | ||||||
|       .httpProxyPort(this.getWxMpConfigStorage().getHttpProxyPort()) |       .httpProxyPort(configStorage.getHttpProxyPort()) | ||||||
|       .httpProxyUsername(this.getWxMpConfigStorage().getHttpProxyUsername()) |       .httpProxyUsername(configStorage.getHttpProxyUsername()) | ||||||
|       .httpProxyPassword(this.getWxMpConfigStorage().getHttpProxyPassword()); |       .httpProxyPassword(configStorage.getHttpProxyPassword()); | ||||||
|  |  | ||||||
|     // if (this.getWxMpConfigStorage().getSSLContext() != null) { |     if (configStorage.getHttpProxyHost() != null && configStorage.getHttpProxyPort() > 0) { | ||||||
|     // SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( |       this.httpProxy = new HttpHost(configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort()); | ||||||
|     // this.getWxMpConfigStorage().getSSLContext(), new String[] { "TLSv1" }, null, |  | ||||||
|     // new DefaultHostnameVerifier()); |  | ||||||
|     // apacheHttpClientBuilder.sslConnectionSocketFactory(sslsf); |  | ||||||
|     // } |  | ||||||
|  |  | ||||||
|     if (this.getWxMpConfigStorage().getHttpProxyHost() != null && this.getWxMpConfigStorage().getHttpProxyPort() > 0) { |  | ||||||
|       this.httpProxy = new HttpHost(this.getWxMpConfigStorage().getHttpProxyHost(), this.getWxMpConfigStorage().getHttpProxyPort()); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     this.httpClient = apacheHttpClientBuilder.build(); |     this.httpClient = apacheHttpClientBuilder.build(); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang