Acceder al ApplicationContext en un HttpSessionListener


public void sessionCreated(HttpSessionEvent event) {
TestService testService = (TestService) getApplicationContext(event).getBean(“testService”);
//….
}

PD: Esto es una nota mental para no olvidarlo, y si de paso le sirve a alguien, pues mejor aún :)
PDD: Están muy bien servicios como gist o pastie, para compartir pequeños trozos de código ;)

Leave a Reply