ServletContextListenerImpl.java
package com.listener;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
/**
* <p>Description: 使用ServletContext监听器创建用于统计在线用户数的全局参数</p>
* @author HiTMT
* @date 2019-10-21 17:10:52
*/
@WebListener()
public class ServletContextListenerImpl implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
ServletContext context = sce.getServletContext()