清理简化代码

This commit is contained in:
Binary Wang
2017-06-25 17:35:52 +08:00
parent 6b1b7f1a81
commit e6c80100c3
4 changed files with 5 additions and 20 deletions

View File

@@ -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;
}
} }

View File

@@ -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();

View File

@@ -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();

View File

@@ -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;
}
} }