增加ShiroSessionListener监听器

This commit is contained in:
shuzheng 2017-02-12 22:11:58 +08:00
parent 78e5be8a33
commit c226c4fdc1
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package com.zheng.upms.server.listener;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
/**
* Created by shuzheng on 2017/2/12.
*/
public class ShiroSessionListener implements SessionListener {
@Override
public void onStart(Session session) {
System.out.println("会话创建:" + session.getId());
}
@Override
public void onStop(Session session) {
System.out.println("会话停止:" + session.getId());
}
@Override
public void onExpiration(Session session) {
System.out.println("会话过期:" + session.getId());
}
}