瀏覽代碼

修复企业号proxy为空的bug,并重构规范若干变量的命名

master
BinaryWang 8 年之前
父節點
當前提交
023ed9a2a1
共有 4 個檔案被更改,包括 50 行新增48 行删除
  1. +4
    -4
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpConfigStorage.java
  2. +20
    -20
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpInMemoryConfigStorage.java
  3. +20
    -20
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpJedisConfigStorage.java
  4. +6
    -4
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpServiceImpl.java

+ 4
- 4
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpConfigStorage.java 查看文件

@@ -55,13 +55,13 @@ public interface WxCpConfigStorage {

String getOauth2redirectUri();

String getHttp_proxy_host();
String getHttpProxyHost();

int getHttp_proxy_port();
int getHttpProxyPort();

String getHttp_proxy_username();
String getHttpProxyUsername();

String getHttp_proxy_password();
String getHttpProxyPassword();

File getTmpDirFile();



+ 20
- 20
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpInMemoryConfigStorage.java 查看文件

@@ -26,10 +26,10 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {

protected volatile String oauth2redirectUri;

protected volatile String http_proxy_host;
protected volatile int http_proxy_port;
protected volatile String http_proxy_username;
protected volatile String http_proxy_password;
protected volatile String httpProxyHost;
protected volatile int httpProxyPort;
protected volatile String httpProxyUsername;
protected volatile String httpProxyPassword;

protected volatile String jsapiTicket;
protected volatile long jsapiTicketExpiresTime;
@@ -166,39 +166,39 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage {
}

@Override
public String getHttp_proxy_host() {
return this.http_proxy_host;
public String getHttpProxyHost() {
return this.httpProxyHost;
}

public void setHttp_proxy_host(String http_proxy_host) {
this.http_proxy_host = http_proxy_host;
public void setHttpProxyHost(String httpProxyHost) {
this.httpProxyHost = httpProxyHost;
}

@Override
public int getHttp_proxy_port() {
return this.http_proxy_port;
public int getHttpProxyPort() {
return this.httpProxyPort;
}

public void setHttp_proxy_port(int http_proxy_port) {
this.http_proxy_port = http_proxy_port;
public void setHttpProxyPort(int httpProxyPort) {
this.httpProxyPort = httpProxyPort;
}

@Override
public String getHttp_proxy_username() {
return this.http_proxy_username;
public String getHttpProxyUsername() {
return this.httpProxyUsername;
}

public void setHttp_proxy_username(String http_proxy_username) {
this.http_proxy_username = http_proxy_username;
public void setHttpProxyUsername(String httpProxyUsername) {
this.httpProxyUsername = httpProxyUsername;
}

@Override
public String getHttp_proxy_password() {
return this.http_proxy_password;
public String getHttpProxyPassword() {
return this.httpProxyPassword;
}

public void setHttp_proxy_password(String http_proxy_password) {
this.http_proxy_password = http_proxy_password;
public void setHttpProxyPassword(String httpProxyPassword) {
this.httpProxyPassword = httpProxyPassword;
}

@Override


+ 20
- 20
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpJedisConfigStorage.java 查看文件

@@ -29,10 +29,10 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
private volatile String oauth2redirectUri;
private volatile String http_proxy_host;
private volatile int http_proxy_port;
private volatile String http_proxy_username;
private volatile String http_proxy_password;
private volatile String httpProxyHost;
private volatile int httpProxyPort;
private volatile String httpProxyUsername;
private volatile String httpProxyPassword;
private volatile File tmpDirFile;
@@ -185,23 +185,23 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
}
@Override
public String getHttp_proxy_host() {
return this.http_proxy_host;
public String getHttpProxyHost() {
return this.httpProxyHost;
}
@Override
public int getHttp_proxy_port() {
return this.http_proxy_port;
public int getHttpProxyPort() {
return this.httpProxyPort;
}
@Override
public String getHttp_proxy_username() {
return this.http_proxy_username;
public String getHttpProxyUsername() {
return this.httpProxyUsername;
}
@Override
public String getHttp_proxy_password() {
return this.http_proxy_password;
public String getHttpProxyPassword() {
return this.httpProxyPassword;
}
@Override
@@ -240,20 +240,20 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
this.oauth2redirectUri = oauth2redirectUri;
}
public void setHttp_proxy_host(String http_proxy_host) {
this.http_proxy_host = http_proxy_host;
public void setHttpProxyHost(String httpProxyHost) {
this.httpProxyHost = httpProxyHost;
}
public void setHttp_proxy_port(int http_proxy_port) {
this.http_proxy_port = http_proxy_port;
public void setHttpProxyPort(int httpProxyPort) {
this.httpProxyPort = httpProxyPort;
}
public void setHttp_proxy_username(String http_proxy_username) {
this.http_proxy_username = http_proxy_username;
public void setHttpProxyUsername(String httpProxyUsername) {
this.httpProxyUsername = httpProxyUsername;
}
public void setHttp_proxy_password(String http_proxy_password) {
this.http_proxy_password = http_proxy_password;
public void setHttpProxyPassword(String httpProxyPassword) {
this.httpProxyPassword = httpProxyPassword;
}
public void setTmpDirFile(File tmpDirFile) {


+ 6
- 4
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpServiceImpl.java 查看文件

@@ -626,11 +626,13 @@ public class WxCpServiceImpl implements WxCpService {
apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get();
}
apacheHttpClientBuilder
.httpProxyHost(this.wxCpConfigStorage.getHttp_proxy_host())
.httpProxyPort(this.wxCpConfigStorage.getHttp_proxy_port())
.httpProxyUsername(this.wxCpConfigStorage.getHttp_proxy_username())
.httpProxyPassword(this.wxCpConfigStorage.getHttp_proxy_password());
.httpProxyHost(this.wxCpConfigStorage.getHttpProxyHost())
.httpProxyPort(this.wxCpConfigStorage.getHttpProxyPort())
.httpProxyUsername(this.wxCpConfigStorage.getHttpProxyUsername())
.httpProxyPassword(this.wxCpConfigStorage.getHttpProxyPassword());

this.httpProxy = new HttpHost(this.wxCpConfigStorage.getHttpProxyHost(),
this.wxCpConfigStorage.getHttpProxyPort());
this.httpClient = apacheHttpClientBuilder.build();
}



Loading…
取消
儲存