mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-11-01 03:25:35 +08:00 
			
		
		
		
	issue #84 Wx*ConfigStorage在多线程环境下有visibility问题
This commit is contained in:
		| @ -9,21 +9,21 @@ import me.chanjar.weixin.common.bean.WxAccessToken; | |||||||
|  */ |  */ | ||||||
| public class WxCpInMemoryConfigStorage implements WxCpConfigStorage { | public class WxCpInMemoryConfigStorage implements WxCpConfigStorage { | ||||||
|  |  | ||||||
|   protected String corpId; |   protected volatile String corpId; | ||||||
|   protected String corpSecret; |   protected volatile String corpSecret; | ||||||
|  |  | ||||||
|   protected String token; |   protected volatile String token; | ||||||
|   protected String accessToken; |   protected volatile String accessToken; | ||||||
|   protected String aesKey; |   protected volatile String aesKey; | ||||||
|   protected String agentId; |   protected volatile String agentId; | ||||||
|   protected long expiresTime; |   protected volatile long expiresTime; | ||||||
|  |  | ||||||
|   protected String oauth2redirectUri; |   protected volatile String oauth2redirectUri; | ||||||
|  |  | ||||||
|   protected String http_proxy_host; |   protected volatile String http_proxy_host; | ||||||
|   protected int http_proxy_port; |   protected volatile int http_proxy_port; | ||||||
|   protected String http_proxy_username; |   protected volatile String http_proxy_username; | ||||||
|   protected String http_proxy_password; |   protected volatile String http_proxy_password; | ||||||
|  |  | ||||||
|   public String getAccessToken() { |   public String getAccessToken() { | ||||||
|     return this.accessToken; |     return this.accessToken; | ||||||
|  | |||||||
| @ -9,24 +9,22 @@ import me.chanjar.weixin.common.bean.WxAccessToken; | |||||||
|  */ |  */ | ||||||
| public class WxMpInMemoryConfigStorage implements WxMpConfigStorage { | public class WxMpInMemoryConfigStorage implements WxMpConfigStorage { | ||||||
|  |  | ||||||
|   private static final long l = 7000 * 1000l; |   protected volatile String appId; | ||||||
|  |   protected volatile String secret; | ||||||
|  |   protected volatile String token; | ||||||
|  |   protected volatile String accessToken; | ||||||
|  |   protected volatile String aesKey; | ||||||
|  |   protected volatile long expiresTime; | ||||||
|  |  | ||||||
|   protected String appId; |   protected volatile String oauth2redirectUri; | ||||||
|   protected String secret; |  | ||||||
|   protected String token; |  | ||||||
|   protected String accessToken; |  | ||||||
|   protected String aesKey; |  | ||||||
|   protected long expiresTime; |  | ||||||
|  |  | ||||||
|   protected 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 String http_proxy_host; |   protected volatile String jsapiTicket; | ||||||
|   protected int http_proxy_port; |   protected volatile long jsapiTicketExpiresTime; | ||||||
|   protected String http_proxy_username; |  | ||||||
|   protected String http_proxy_password; |  | ||||||
|  |  | ||||||
|   protected String jsapiTicket; |  | ||||||
|   protected long jsapiTicketExpiresTime; |  | ||||||
|  |  | ||||||
|   public String getAccessToken() { |   public String getAccessToken() { | ||||||
|     return this.accessToken; |     return this.accessToken; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Daniel Qian
					Daniel Qian