mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-07 07:04:37 +08:00
🎨 #3591【微信支付】修复只设置privateKeyString或者privateKeyContent时私钥初始化失败的问题
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
Some checks failed
Publish to Maven Central / build-and-publish (push) Has been cancelled
This commit is contained in:
@@ -345,7 +345,7 @@ public class WxPayConfig {
|
||||
}
|
||||
|
||||
// 加载api私钥
|
||||
if (merchantPrivateKey == null && StringUtils.isNotBlank(this.getPrivateKeyPath())) {
|
||||
if (merchantPrivateKey == null && (StringUtils.isNotBlank(this.getPrivateKeyPath()) || StringUtils.isNotBlank(this.getPrivateKeyString()) || null != this.privateKeyContent)) {
|
||||
try (InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(),
|
||||
this.privateKeyContent, "privateKeyPath")) {
|
||||
merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);
|
||||
|
Reference in New Issue
Block a user