Commit fb2a875d authored by shiyu's avatar shiyu

预支付接口

parent f42c1fca
...@@ -42,10 +42,8 @@ public class WxPayAutoCertificateConfig { ...@@ -42,10 +42,8 @@ public class WxPayAutoCertificateConfig {
try { try {
String path = this.getClass().getResource("/apiclient_key.pem").getPath(); String path = this.getClass().getResource("/apiclient_key.pem").getPath();
String fileContent = new String(Files.readAllBytes(Paths.get(path)), "utf-8"); String fileContent = new String(Files.readAllBytes(Paths.get(path)), "utf-8");
String privateKey = fileContent.replace("-----BEGIN PRIVATE KEY-----", "") logger.info("***************", fileContent);
.replace("-----END PRIVATE KEY-----", "") return fileContent;
.replaceAll("\\s+", "");
return privateKey;
} catch (Exception e) { } catch (Exception e) {
logger.error("加载私钥错误 error :{}", e); logger.error("加载私钥错误 error :{}", e);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment