Tomcat啓動時方法啓動

啓動Tomcat的時候方法啓動 ,可以使用監聽。 1.繼承ServletContextListener ,實現 contextInitialized(),contextDestroyed(),兩個方法  。(第一個是要執行的方法,第二個監聽器銷燬) 2.配置web.xml監聽(謹記) 3.測試結果
相關文章
相關標籤/搜索