mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-25 10:08:16 +08:00
重构修复部分代码
This commit is contained in:
parent
c7efcae635
commit
71709bbc36
@ -108,7 +108,6 @@ public class DefaultApacheHttpClientBuilder implements ApacheHttpClientBuilder {
|
|||||||
.register("https", this.sslConnectionSocketFactory)
|
.register("https", this.sslConnectionSocketFactory)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
|
||||||
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
|
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(registry);
|
||||||
connectionManager.setMaxTotal(this.maxTotalConn);
|
connectionManager.setMaxTotal(this.maxTotalConn);
|
||||||
connectionManager.setDefaultMaxPerRoute(this.maxConnPerHost);
|
connectionManager.setDefaultMaxPerRoute(this.maxConnPerHost);
|
||||||
|
@ -157,7 +157,6 @@ public class WxCpServiceImpl implements WxCpService {
|
|||||||
long timestamp = System.currentTimeMillis() / 1000;
|
long timestamp = System.currentTimeMillis() / 1000;
|
||||||
String noncestr = RandomUtils.getRandomStr();
|
String noncestr = RandomUtils.getRandomStr();
|
||||||
String jsapiTicket = getJsapiTicket(false);
|
String jsapiTicket = getJsapiTicket(false);
|
||||||
try {
|
|
||||||
String signature = SHA1.genWithAmple(
|
String signature = SHA1.genWithAmple(
|
||||||
"jsapi_ticket=" + jsapiTicket,
|
"jsapi_ticket=" + jsapiTicket,
|
||||||
"noncestr=" + noncestr,
|
"noncestr=" + noncestr,
|
||||||
@ -174,9 +173,6 @@ public class WxCpServiceImpl implements WxCpService {
|
|||||||
jsapiSignature.setAppid(this.wxCpConfigStorage.getCorpId());
|
jsapiSignature.setAppid(this.wxCpConfigStorage.getCorpId());
|
||||||
|
|
||||||
return jsapiSignature;
|
return jsapiSignature;
|
||||||
} catch (NoSuchAlgorithmException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void messageSend(WxCpMessage message) throws WxErrorException {
|
public void messageSend(WxCpMessage message) throws WxErrorException {
|
||||||
|
Loading…
Reference in New Issue
Block a user