Commit 8cfdd0fd authored by hezhen's avatar hezhen

123

parent 3cae10ea
......@@ -89,5 +89,12 @@ public class JsTicket implements Serializable {
this.ticket = ticket;
}
@Override
public String toString() {
return "JsTicket [ticket=" + ticket + ", expires_in=" + expires_in + ", expiredTime=" + expiredTime + "]";
}
}
......@@ -92,8 +92,10 @@ public class JsTicketService {
jsTicket = new JsTicket(json);
/*Element element = new Element(SystemConfig.WINXIN_AppID, jsTicket);
ehcache.put(element);*/
log.info("----jsTicket===="+jsTicket);
JSONObject obj = new JSONObject();
summbitRedisTemplate.delete(key);
log.info("----obj===="+obj.toJSONString());
Boolean suc=summbitRedisTemplate.opsForValue().setIfAbsent(key, obj.toJSONString());
if (suc) {
summbitRedisTemplate.expire(wy_appid, jsTicket.getExpiresIn(), TimeUnit.MINUTES);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment