1
0
mirror of synced 2026-02-04 16:40:54 +08:00

🎨 #3830 【公共问题】修复使用HttpComponents时不配置proxy password启动报错问题

This commit is contained in:
buaazyl
2026-01-06 11:19:28 +08:00
committed by GitHub
parent 521d46d957
commit 987001214d
6 changed files with 15 additions and 11 deletions

View File

@@ -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());