标签:方法 back list let 初始化 get blog xtu listen
1实现HttpSessionListener和ServletContextListener,2个接口
2然后在contextInitialized初始化方法里面:
ServletContext application = event.getServletContext();
WebApplicationContext appctx = WebApplicationContextUtils.getWebApplicationContext(application);
newsSubmissionService = appctx.getBean(NewsSubmissionService.class);
3在web.xml里面配置
<listener>
<listener-class>com.guduo.log.TaskReBack</listener-class>
</listener>
标签:方法 back list let 初始化 get blog xtu listen
原文地址:http://www.cnblogs.com/xwjBlog/p/6484463.html