mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 #3830 【公共问题】修复使用HttpComponents时不配置proxy password启动报错问题
This commit is contained in:
@@ -51,7 +51,8 @@ public class WxMpServiceHttpComponentsImpl extends BaseWxMpServiceImpl<Closeable
|
||||
apacheHttpClientBuilder.httpProxyHost(configStorage.getHttpProxyHost())
|
||||
.httpProxyPort(configStorage.getHttpProxyPort())
|
||||
.httpProxyUsername(configStorage.getHttpProxyUsername())
|
||||
.httpProxyPassword(configStorage.getHttpProxyPassword().toCharArray());
|
||||
.httpProxyPassword(configStorage.getHttpProxyPassword() == null ? null :
|
||||
configStorage.getHttpProxyPassword().toCharArray());
|
||||
|
||||
if (configStorage.getHttpProxyHost() != null && configStorage.getHttpProxyPort() > 0) {
|
||||
this.httpProxy = new HttpHost(configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort());
|
||||
|
||||
Reference in New Issue
Block a user