一、传统的方法(configguration)Slf4jpublicclassMyListenerimplementsServletContextListener{OverridepublicvoidcontextInitialized(ServletContextEventsce){log.info("web项目的启动{}一开始就启动",sce.getServletContext());System.err.println("web项目的启动{}");}OverridepublicvoidcontextDestroyed(ServletContextEventsce){log.info("web项目的关闭{}.........................");System.err.println("web项目...