Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将pem文件放到resources下,RSAAutoCertificateConfig无法读取到配置文件 #252

Open
Astrsea opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Astrsea
Copy link

Astrsea commented Jan 19, 2024

错误描述

将pem文件放到resources下,RSAAutoCertificateConfig无法读取到配置文件

重现bug的步骤

1.将pem文件放在resources下
屏幕截图 2024-01-19 124654
2.springboot.yml配置pem文件的路径
2
3.创建配置文件的实体类对象
3
4.RSAAutoCertificateConfig中传入配置对象
4

预期行为

不论是否在配置是否为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

@Astrsea Astrsea added the bug Something isn't working label Jan 19, 2024
@Proito666
Copy link

#198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants