mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-14 18:25:10 +08:00
清理简化代码
This commit is contained in:
@@ -400,4 +400,9 @@ public abstract class AbstractWxMpServiceImpl<H, P> implements WxMpService, Requ
|
|||||||
public WxMpShakeService getShakeService(){
|
public WxMpShakeService getShakeService(){
|
||||||
return this.shakeService;
|
return this.shakeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RequestHttp getRequestHttp() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,6 @@ import me.chanjar.weixin.common.bean.WxAccessToken;
|
|||||||
import me.chanjar.weixin.common.bean.result.WxError;
|
import me.chanjar.weixin.common.bean.result.WxError;
|
||||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||||
import me.chanjar.weixin.common.util.http.HttpType;
|
import me.chanjar.weixin.common.util.http.HttpType;
|
||||||
import me.chanjar.weixin.common.util.http.RequestHttp;
|
|
||||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||||
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
|
||||||
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
||||||
@@ -61,11 +60,6 @@ public class WxMpServiceApacheHttpClientImpl extends AbstractWxMpServiceImpl<Clo
|
|||||||
this.httpClient = apacheHttpClientBuilder.build();
|
this.httpClient = apacheHttpClientBuilder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RequestHttp getRequestHttp() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
|
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
|
||||||
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
|
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
|
||||||
|
@@ -6,7 +6,6 @@ import me.chanjar.weixin.common.bean.WxAccessToken;
|
|||||||
import me.chanjar.weixin.common.bean.result.WxError;
|
import me.chanjar.weixin.common.bean.result.WxError;
|
||||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||||
import me.chanjar.weixin.common.util.http.HttpType;
|
import me.chanjar.weixin.common.util.http.HttpType;
|
||||||
import me.chanjar.weixin.common.util.http.RequestHttp;
|
|
||||||
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
||||||
import me.chanjar.weixin.mp.api.WxMpService;
|
import me.chanjar.weixin.mp.api.WxMpService;
|
||||||
|
|
||||||
@@ -46,12 +45,6 @@ public class WxMpServiceJoddHttpImpl extends AbstractWxMpServiceImpl<HttpConnect
|
|||||||
httpClient = JoddHttp.httpConnectionProvider;
|
httpClient = JoddHttp.httpConnectionProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RequestHttp getRequestHttp() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
|
public String getAccessToken(boolean forceRefresh) throws WxErrorException {
|
||||||
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
|
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
|
||||||
|
@@ -4,7 +4,6 @@ import me.chanjar.weixin.common.bean.WxAccessToken;
|
|||||||
import me.chanjar.weixin.common.bean.result.WxError;
|
import me.chanjar.weixin.common.bean.result.WxError;
|
||||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||||
import me.chanjar.weixin.common.util.http.HttpType;
|
import me.chanjar.weixin.common.util.http.HttpType;
|
||||||
import me.chanjar.weixin.common.util.http.RequestHttp;
|
|
||||||
import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo;
|
import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo;
|
||||||
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
||||||
import me.chanjar.weixin.mp.api.WxMpService;
|
import me.chanjar.weixin.mp.api.WxMpService;
|
||||||
@@ -94,10 +93,4 @@ public class WxMpServiceOkHttpImpl extends AbstractWxMpServiceImpl<ConnectionPoo
|
|||||||
httpClient = new ConnectionPool();
|
httpClient = new ConnectionPool();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RequestHttp getRequestHttp() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user