在WebService中实现了ServletContextListener ,在启动的时候发现contextInitialized执行,关闭时发现contextDestroyed 没有执行,在contextDestroyed中添加LOG也没有运行,通过网络查询知道:不能直接关闭tomcat,而是应该用shutdown.bat来关闭tomcat,(要不要shutdown.bat干嘛啊,呵呵),通过shutdown.bat关闭tomcat发现contextDestroyed 正常运行。
tomcat ServletContextListener contextDestroyed 没有执行
最新推荐文章于 2023-09-22 17:07:28 发布