KeyStore keyStore = KeyStore.getInstance("PKCS12");
// Resource resource = new ClassPathResource("config/wx_apiclient_cert.p12);
in = HttpUtils.class.getResourceAsStream("/config/wx_apiclient_cert.p12");
char[] keyPassword = WXMessageUtils.getMessage(MCHID).toCharArray(); //证书密码
// keyStore.load(resource.getInputStream(), keyPassword);
keyStore.load(in , keyPassword);
wx_ssl_context = SSLContexts.custom().loadKeyMaterial(keyStore, keyPassword).build();
无法读取到证书,求大神帮忙,两种方法都读不到
已經解決了IO读写P12文件时乱码,在配置文件配置一下就OK了