mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
🐛 解决未配置微信支付公钥的情况下启动失败的问题
This commit is contained in:
@@ -27,6 +27,7 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.FileReader;
|
||||
import java.io.InputStreamReader;
|
||||
@@ -79,6 +80,10 @@ public class InMemoryWechatTenantService implements WechatTenantService {
|
||||
}
|
||||
|
||||
private WeChatPublicKeyInfo initWeChatPublicKeyInfo(WechatMetaBean meta) {
|
||||
boolean enablePublicKey=StringUtils.hasLength(meta.getV3().getWeChatPayPublicKeyId()) && StringUtils.hasLength(meta.getV3().getWeChatPayPublicKeyPath());
|
||||
if (!enablePublicKey) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
String certPath=meta.getV3().getWeChatPayPublicKeyPath();
|
||||
Resource resource =
|
||||
|
||||
Reference in New Issue
Block a user