Open Astrsea opened 8 months ago
将pem文件放到resources下,RSAAutoCertificateConfig无法读取到配置文件
1.将pem文件放在resources下
2.springboot.yml配置pem文件的路径
3.创建配置文件的实体类对象
4.RSAAutoCertificateConfig中传入配置对象
不论是否在配置是否为private-key-path: apiclient_key.pem或者private-key-path: classpath:apiclient_key.pem,打包成jar包后,在linux环境运行时都会出现无法读取到pem文件的问题
return new RSAAutoCertificateConfig.Builder() .merchantId(wxProperty.getMchId()) .privateKeyFromPath(wxProperty.getPrivateKeyPath()) .merchantSerialNumber(wxProperty.getMchSerialNo()) .apiV3Key(wxProperty.getApiV3Key()) .build();
Linux
java 17
0.2.12
No response
错误描述
将pem文件放到resources下,RSAAutoCertificateConfig无法读取到配置文件
重现bug的步骤
1.将pem文件放在resources下
2.springboot.yml配置pem文件的路径
3.创建配置文件的实体类对象
4.RSAAutoCertificateConfig中传入配置对象
预期行为
不论是否在配置是否为private-key-path: apiclient_key.pem或者private-key-path: classpath:apiclient_key.pem,打包成jar包后,在linux环境运行时都会出现无法读取到pem文件的问题
导致错误的代码片段
return new RSAAutoCertificateConfig.Builder() .merchantId(wxProperty.getMchId()) .privateKeyFromPath(wxProperty.getPrivateKeyPath()) .merchantSerialNumber(wxProperty.getMchSerialNo()) .apiV3Key(wxProperty.getApiV3Key()) .build();
操作系统
Linux
Java 版本
java 17
wechatpay-java 版本
0.2.12
其他信息
No response