增加shiro的session监听器

This commit is contained in:
shuzheng 2017-02-24 00:09:08 +08:00
parent 142cec2e24
commit 62c030444e
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
package com.zheng.upms.server.shiro.listener;
import com.zheng.upms.server.controller.manage.UpmsOrganizationController;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Created by shuzheng on 2017/2/12.
*/
public class ShiroSessionListener implements SessionListener {
private static Logger _log = LoggerFactory.getLogger(ShiroSessionListener.class);
@Override
public void onStart(Session session) {
_log.debug("会话创建:" + session.getId());
}
@Override
public void onStop(Session session) {
_log.debug("会话停止:" + session.getId());
}
@Override
public void onExpiration(Session session) {
_log.debug("会话过期:" + session.getId());
}
}