Skip to content

Commit 4bd7e61

Browse files
committed
规范代码命名格式
1 parent c2f00a1 commit 4bd7e61

File tree

2 files changed

+29
-47
lines changed

2 files changed

+29
-47
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpConfigStorage.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ public interface WxMpConfigStorage {
8181

8282
String getOauth2redirectUri();
8383

84-
String getHttp_proxy_host();
84+
String getHttpProxyHost();
8585

86-
int getHttp_proxy_port();
86+
int getHttpProxyPort();
8787

88-
String getHttp_proxy_username();
88+
String getHttpProxyUsername();
8989

90-
String getHttp_proxy_password();
90+
String getHttpProxyPassword();
9191

9292
File getTmpDirFile();
9393

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpInMemoryConfigStorage.java

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder;
55

66
import javax.net.ssl.SSLContext;
7+
8+
import org.apache.commons.lang3.builder.ToStringBuilder;
9+
import org.apache.commons.lang3.builder.ToStringStyle;
10+
711
import java.io.File;
812

913
/**
@@ -24,10 +28,10 @@ public class WxMpInMemoryConfigStorage implements WxMpConfigStorage {
2428

2529
protected volatile String oauth2redirectUri;
2630

27-
protected volatile String http_proxy_host;
28-
protected volatile int http_proxy_port;
29-
protected volatile String http_proxy_username;
30-
protected volatile String http_proxy_password;
31+
protected volatile String httpProxyHost;
32+
protected volatile int httpProxyPort;
33+
protected volatile String httpProxyUsername;
34+
protected volatile String httpProxyPassword;
3135

3236
protected volatile String jsapiTicket;
3337
protected volatile long jsapiTicketExpiresTime;
@@ -187,63 +191,41 @@ public void setOauth2redirectUri(String oauth2redirectUri) {
187191
this.oauth2redirectUri = oauth2redirectUri;
188192
}
189193

190-
@Override
191-
public String getHttp_proxy_host() {
192-
return this.http_proxy_host;
194+
public String getHttpProxyHost() {
195+
return this.httpProxyHost;
193196
}
194197

195-
public void setHttp_proxy_host(String http_proxy_host) {
196-
this.http_proxy_host = http_proxy_host;
198+
public void setHttpProxyHost(String httpProxyHost) {
199+
this.httpProxyHost = httpProxyHost;
197200
}
198201

199-
@Override
200-
public int getHttp_proxy_port() {
201-
return this.http_proxy_port;
202+
public int getHttpProxyPort() {
203+
return this.httpProxyPort;
202204
}
203205

204-
public void setHttp_proxy_port(int http_proxy_port) {
205-
this.http_proxy_port = http_proxy_port;
206+
public void setHttpProxyPort(int httpProxyPort) {
207+
this.httpProxyPort = httpProxyPort;
206208
}
207209

208-
@Override
209-
public String getHttp_proxy_username() {
210-
return this.http_proxy_username;
210+
public String getHttpProxyUsername() {
211+
return this.httpProxyUsername;
211212
}
212213

213-
public void setHttp_proxy_username(String http_proxy_username) {
214-
this.http_proxy_username = http_proxy_username;
214+
public void setHttpProxyUsername(String httpProxyUsername) {
215+
this.httpProxyUsername = httpProxyUsername;
215216
}
216217

217-
@Override
218-
public String getHttp_proxy_password() {
219-
return this.http_proxy_password;
218+
public String getHttpProxyPassword() {
219+
return this.httpProxyPassword;
220220
}
221221

222-
public void setHttp_proxy_password(String http_proxy_password) {
223-
this.http_proxy_password = http_proxy_password;
222+
public void setHttpProxyPassword(String httpProxyPassword) {
223+
this.httpProxyPassword = httpProxyPassword;
224224
}
225225

226226
@Override
227227
public String toString() {
228-
return "WxMpInMemoryConfigStorage{" +
229-
"appId='" + this.appId + '\'' +
230-
", secret='" + this.secret + '\'' +
231-
", token='" + this.token + '\'' +
232-
", partnerId='" + this.partnerId + '\'' +
233-
", partnerKey='" + this.partnerKey + '\'' +
234-
", accessToken='" + this.accessToken + '\'' +
235-
", aesKey='" + this.aesKey + '\'' +
236-
", expiresTime=" + this.expiresTime +
237-
", http_proxy_host='" + this.http_proxy_host + '\'' +
238-
", http_proxy_port=" + this.http_proxy_port +
239-
", http_proxy_username='" + this.http_proxy_username + '\'' +
240-
", http_proxy_password='" + this.http_proxy_password + '\'' +
241-
", jsapiTicket='" + this.jsapiTicket + '\'' +
242-
", jsapiTicketExpiresTime='" + this.jsapiTicketExpiresTime + '\'' +
243-
", cardApiTicket='" + this.cardApiTicket + '\'' +
244-
", cardApiTicketExpiresTime='" + this.cardApiTicketExpiresTime + '\'' +
245-
", tmpDirFile='" + this.tmpDirFile + '\'' +
246-
'}';
228+
return ToStringBuilder.reflectionToString(this,ToStringStyle.JSON_STYLE);
247229
}
248230

249231
@Override

0 commit comments

Comments
 (0)