From ff987c1b72aceaaa17c5f486052cf96323b11d32 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 19 九月 2024 18:52:03 +0800 Subject: [PATCH] 增加生产环境配置 --- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java index 71eb21c..b08ca9d 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java @@ -5,6 +5,7 @@ import org.apache.poi.util.IOUtils; import java.io.ByteArrayInputStream; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -54,8 +55,10 @@ public InputStream getPrivateKeyStream() { // 需要证书释放 byte[] certData; - InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(this.privateKeyPath); +// InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(this.privateKeyPath); + InputStream certStream = null; try { + certStream = new FileInputStream(this.privateKeyPath); certData = IOUtils.toByteArray(certStream); } catch (IOException e) { throw new RuntimeException("私钥文件未找到"); -- Gitblit v1.7.1