update md
This commit is contained in:
parent
766b8da3cb
commit
b7e25b3ec9
@ -1,7 +1,17 @@
|
|||||||
包含token的实现
|
TOKEN的实现
|
||||||
|
==========
|
||||||
|
|
||||||
FileTokenHolder.java 基于文件保存的token实现
|
TokenHolder.java token持有者接口
|
||||||
|
-------------------------------
|
||||||
|
FileTokenHolder.java 基于文件保存的TokenHolder实现
|
||||||
|
------------------------------------------------
|
||||||
|
RedisTokenHolder.java 基于redis保存的TokenHolder实现(推荐)
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
RedisTokenHolder.java 基于redis保存的token实现(推荐)
|
|
||||||
|
|
||||||
当然自己也可实现token的存取,继承`AbstractTokenHolder`实现`getToken`方法
|
TokenCreator.java token创建者接口
|
||||||
|
--------------------------------
|
||||||
|
WeixinTokenCreator.java 微信公众平台及企业号access_token的获取
|
||||||
|
-----------------------------------------------------------
|
||||||
|
WeixinJSTicketCreator.java 微信js接口的jsapi_ticket的获取
|
||||||
|
-------------------------------------------------------
|
||||||
@ -69,7 +69,7 @@ weixin.properties说明
|
|||||||
// weixinProxy = new WeixinProxy(weixinAccount);
|
// weixinProxy = new WeixinProxy(weixinAccount);
|
||||||
weixinProxy.getUser(openId);
|
weixinProxy.getUser(openId);
|
||||||
|
|
||||||
3.针对`token`存储有两种方案,`File存储`/`Redis存储`,当然也可自己实现`TokenHolder`(继承`AbstractTokenHolder`并重写`getToken`方法),默认使用文件(xml)的方式保存token,如果环境中支持`redis`,建议使用`RedisTokenHolder`.
|
3.针对`token`存储有两种方案,`File存储`/`Redis存储`,当然也可自己实现`TokenHolder`,默认使用文件(xml)的方式保存token,如果环境中支持`redis`,建议使用`RedisTokenHolder`.
|
||||||
|
|
||||||
WeixinProxy weixinProxy = new WeixinProxy(new RedisTokenHolder());
|
WeixinProxy weixinProxy = new WeixinProxy(new RedisTokenHolder());
|
||||||
// weixinProxy = new WeixinProxy(new RedisTokenHolder(weixinAccount));
|
// weixinProxy = new WeixinProxy(new RedisTokenHolder(weixinAccount));
|
||||||
|
|||||||
@ -41,7 +41,7 @@ weixin.properties说明
|
|||||||
// weixinProxy = new WeixinProxy(weixinAccount);
|
// weixinProxy = new WeixinProxy(weixinAccount);
|
||||||
weixinProxy.getUser(userid);
|
weixinProxy.getUser(userid);
|
||||||
|
|
||||||
3.针对`token`存储有两种方案,`File存储`/`Redis存储`,当然也可自己实现`TokenHolder`(继承`AbstractTokenHolder`并重写`getToken`方法),默认使用文件(xml)的方式保存token,如果环境中支持`redis`,建议使用`RedisTokenHolder`.
|
3.针对`token`存储有两种方案,`File存储`/`Redis存储`,当然也可自己实现`TokenHolder`,默认使用文件(xml)的方式保存token,如果环境中支持`redis`,建议使用`RedisTokenHolder`.
|
||||||
|
|
||||||
WeixinProxy weixinProxy = new WeixinProxy(new RedisTokenHolder());
|
WeixinProxy weixinProxy = new WeixinProxy(new RedisTokenHolder());
|
||||||
// weixinProxy = new WeixinProxy(new RedisTokenHolder(weixinAccount));
|
// weixinProxy = new WeixinProxy(new RedisTokenHolder(weixinAccount));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user