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.
29 lines
793 B
29 lines
793 B
2 years ago
|
package com.ynxbd.common.config;
|
||
|
|
||
|
import com.ynxbd.common.helper.common.VersionHelper;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
|
||
|
import javax.servlet.ServletContextEvent;
|
||
|
import javax.servlet.ServletContextListener;
|
||
|
|
||
|
/**
|
||
|
* 监听应用启动和销毁
|
||
|
*
|
||
|
* @Author wsq
|
||
|
* @Date 2020/12/8 15:57
|
||
|
* @Copyright @ 2020 云南新八达科技有限公司 All rights reserved.
|
||
|
*/
|
||
|
@Slf4j
|
||
|
public class WebContextLister implements ServletContextListener {
|
||
|
public void contextInitialized(ServletContextEvent event) {
|
||
|
log.info("[版本]当前版号--{}", VersionHelper.getAppVersion());
|
||
|
InitHelper.reToken();
|
||
|
}
|
||
|
|
||
|
public void contextDestroyed(ServletContextEvent event) {
|
||
|
System.out.println("服务关闭");
|
||
|
EhCacheConfig.close();
|
||
|
}
|
||
|
|
||
|
}
|