wechatpay-apiv3 / wechatpay-apache-httpclient

微信支付 APIv3 Apache HttpClient装饰器(decorator)
https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pages/index.shtml
Apache License 2.0
674 stars 251 forks source link

使用DefaultHttpClientBuilder构造出来的HttpClient需要关闭吗? #175

Closed sxshunrj closed 1 year ago

sxshunrj commented 1 year ago

com.wechat.pay.java.core.http.HttpClient接口并没有close方法,代码如下:

Config config = new RSAConfig.Builder() .merchantId(merchantId) .privateKeyFromPath(privateKeyPath) .merchantSerialNumber(merchantSerialNumber) .wechatPayCertificatesFromPath(wechatPayCertificatePath) .build();

HttpClient httpClient = new DefaultHttpClientBuilder() .readTimeoutMs(3000) .writeTimeoutMs(3000) .connectTimeoutMs(3000) .credential(requireNonNull(config.createCredential())) .validator(requireNonNull(config.createValidator())) .build();

image

xy-peng commented 1 year ago

你用的是 wechatpay-java,请到对应的repo提issue。

wechatpay-javawechatpay-apache-httpclient 两者只要用一个就行了。