🎨 #1549 微信支付证书读取代码优化,支持读取打进jar包里的证书文件
This commit is contained in:
@@ -145,7 +145,7 @@ public class WxPayConfig {
|
|||||||
if (!path.startsWith("/")) {
|
if (!path.startsWith("/")) {
|
||||||
path = "/" + path;
|
path = "/" + path;
|
||||||
}
|
}
|
||||||
inputStream = WxPayConfig.class.getResourceAsStream(path);
|
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
|
||||||
if (inputStream == null) {
|
if (inputStream == null) {
|
||||||
throw new WxPayException(fileNotFoundMsg);
|
throw new WxPayException(fileNotFoundMsg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user