🎨 #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

@@ -48,8 +48,10 @@ public class WxQidianServiceHttpComponentsImpl extends BaseWxQidianServiceImpl<C
HttpComponentsClientBuilder apacheHttpClientBuilder = DefaultHttpComponentsClientBuilder.get();
apacheHttpClientBuilder.httpProxyHost(configStorage.getHttpProxyHost())
.httpProxyPort(configStorage.getHttpProxyPort()).httpProxyUsername(configStorage.getHttpProxyUsername())
.httpProxyPassword(configStorage.getHttpProxyPassword().toCharArray());
.httpProxyPort(configStorage.getHttpProxyPort())
.httpProxyUsername(configStorage.getHttpProxyUsername())
.httpProxyPassword(configStorage.getHttpProxyPassword() == null ? null :
configStorage.getHttpProxyPassword().toCharArray());
if (configStorage.getHttpProxyHost() != null && configStorage.getHttpProxyPort() > 0) {
this.httpProxy = new HttpHost(configStorage.getHttpProxyHost(), configStorage.getHttpProxyPort());