企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
![](https://box.kancloud.cn/8a76950c94e8b83608082f1c3224da75_457x182.png) ![](https://box.kancloud.cn/0985e7985f9a83ca3e17f5052cc1dc15_454x193.png) 关掉自动启动浏览器 ![](https://box.kancloud.cn/2b4f501528a015891142920eaeca7f83_760x346.png) FirstHttpSessionListener.java ~~~ package zyw; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; @WebListener() public class FirstHttpSessionListener implements HttpSessionListener { // Public constructor is required by servlet spec public FirstHttpSessionListener() { } public void sessionCreated(HttpSessionEvent se) { /* Session is created. */ System.out.println(se.getSession().getId()); } public void sessionDestroyed(HttpSessionEvent se) { /* Session is destroyed. */ System.out.println("session销毁"); } } ~~~ ![](https://box.kancloud.cn/2c00863bc761d1e4ae210b64fb96368b_252x71.png)