You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
616 B
23 lines
616 B
package com.ynxbd.common.config;
|
|
|
|
import javax.servlet.ServletContextEvent;
|
|
import javax.servlet.ServletContextListener;
|
|
|
|
/**
|
|
* 监听应用启动和销毁
|
|
*
|
|
* @Author wsq
|
|
* @Date 2020/12/8 15:57
|
|
* @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
|
|
*/
|
|
public class WebContextLister implements ServletContextListener {
|
|
public void contextInitialized(ServletContextEvent event) {
|
|
InitHelper.reToken();
|
|
}
|
|
|
|
public void contextDestroyed(ServletContextEvent event) {
|
|
System.out.println("服务关闭");
|
|
EhCacheConfig.close();
|
|
}
|
|
|
|
}
|
|
|