Cailei Lu

Results 7 comments of Cailei Lu

get it 2017-08-31 16:57 GMT+08:00 王爵nice : > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on...

> 使用token+username作为key把当前时间戳也存入redis > 这一步主要用来判断用户登录的token是否快要过期了, 如果直接使用redis的查看剩余时间的API, 就不需要这么做了吧? > > /** > * 根据指定key 查看剩余存活时间 > * @param key > * @return > */ > public Long getFreeTime(String key) { return redisTemplate.getExpire(key);}...

> 是的, 如果根据key在redis中查询不到,就是token过期了. > > 再问个问题, VUE前段需要获取headers中的Authorization, 则需要后端暴露自定义的header, 这个设置放在那里合适? > response.setHeader( "Access-Control-Expose-Headers", "Authorization"); 很抱歉,不是很了解Vue的问题。:-(

认领章节21-Regex as Predicate

认领章节 - 22:Join String