增加ShiroSessionListener监听器
This commit is contained in:
parent
78e5be8a33
commit
c226c4fdc1
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue