1 public class DefaultSessionListener implements HttpSessionListener {
2
3 public void sessionCreated(HttpSessionEvent arg0) {
4
5 ApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(arg0.getSession().getServletContext());
6 IMemberService memberService = (IMemberService) ctx.getBean("memberService"); // 填写要注入的类,注意第一个字母小写
7
8 }
9
10 public void sessionDestroyed(HttpSessionEvent se) {
11 }
12 }