|
9 | 9 | public abstract class AbstractWxOpenConfigStorageConfiguration {
|
10 | 10 |
|
11 | 11 | protected WxOpenInMemoryConfigStorage config(WxOpenInMemoryConfigStorage config, WxOpenProperties properties) {
|
12 |
| - WxOpenProperties.ConfigStorage configStorageProperties = properties.getConfigStorage(); |
| 12 | + WxOpenProperties.ConfigStorage storage = properties.getConfigStorage(); |
13 | 13 | config.setWxOpenInfo(properties.getAppId(), properties.getSecret(), properties.getToken(), properties.getAesKey());
|
14 |
| - config.setHttpProxyHost(configStorageProperties.getHttpProxyHost()); |
15 |
| - config.setHttpProxyUsername(configStorageProperties.getHttpProxyUsername()); |
16 |
| - config.setHttpProxyPassword(configStorageProperties.getHttpProxyPassword()); |
17 |
| - if (configStorageProperties.getHttpProxyPort() != null) { |
18 |
| - config.setHttpProxyPort(configStorageProperties.getHttpProxyPort()); |
| 14 | + config.setHttpProxyHost(storage.getHttpProxyHost()); |
| 15 | + config.setHttpProxyUsername(storage.getHttpProxyUsername()); |
| 16 | + config.setHttpProxyPassword(storage.getHttpProxyPassword()); |
| 17 | + Integer httpProxyPort = storage.getHttpProxyPort(); |
| 18 | + if (httpProxyPort != null) { |
| 19 | + config.setHttpProxyPort(httpProxyPort); |
19 | 20 | }
|
20 |
| - int maxRetryTimes = configStorageProperties.getMaxRetryTimes(); |
21 |
| - if (configStorageProperties.getMaxRetryTimes() < 0) { |
| 21 | + int maxRetryTimes = storage.getMaxRetryTimes(); |
| 22 | + if (maxRetryTimes < 0) { |
22 | 23 | maxRetryTimes = 0;
|
23 | 24 | }
|
24 |
| - int retrySleepMillis = configStorageProperties.getRetrySleepMillis(); |
| 25 | + int retrySleepMillis = storage.getRetrySleepMillis(); |
25 | 26 | if (retrySleepMillis < 0) {
|
26 | 27 | retrySleepMillis = 1000;
|
27 | 28 | }
|
|
0 commit comments