提交 f62bf294 编写于 作者: 爱吃血肠's avatar 爱吃血肠

定时任务清理Redis缓存...

上级 07358f28
......@@ -42,10 +42,16 @@ public class BizQuartz {
* 间隔5秒执行
*/
@Scheduled(cron = "0/5 * * * * ? ")
public void cacheClear() {
public void redisTest() {
LOG.info("@Scheduled-------cacheClear()");
String userName = redisCache.getCache("name",String.class);
LOG.info("登录的用户名称是 :" + userName);
}
/**
* 间隔5分钟执行
*/
@Scheduled(cron = "0 0/5 * * * ? ")
public void cacheClear() {
redisCache.clearCache();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册