67,515
社区成员
发帖
与我相关
我的任务
分享
ApplicationContext context = new FileSystemXmlApplicationContext("applicationContext.xml");
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
@Override
public void sessionDestroyed(HttpSessionEvent event) {
ServletContext context = event.getSession().getServletContext();
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
LoginTempService loginTempService = (loginTempService)ctx.getBean("loginTempService");
}
ServletContext context = arg0.getSession().getServletContext();
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context);
yourService = (YourService)ctx.getBean("yourService");