This commit is contained in:
胡金宇 2017-08-25 12:15:42 +08:00
parent 01fa30f0da
commit 75dfc912f4

View File

@ -91,14 +91,14 @@ public class MchApi extends BaseApi {
*
* @return
*/
protected WeixinRequestExecutor getWeixinSSLExecutor() throws WeixinException {
protected WeixinRequestExecutor getWeixinSSLExecutor() throws WeixinException {
if (weixinSSLExecutor == null) {
try {
InputStream is = null;
File certificate = new File(
Weixin4jConfigUtil.replaceClassPathValue(weixinAccount.getCertificateFile()));
if (!certificate.exists() || !certificate.isFile()) {
is = Weixin4jConfigUtil.CLASSLOADER.getResourceAsStream(weixinAccount.getCertificateFile());
is = Weixin4jConfigUtil.CLASSLOADER.getResourceAsStream(certificate.getName());
} else {
is = new FileInputStream(certificate);
}