How to inject dependencies into HttpSessionListener, using Spring?

前端 未结 3 1897
春和景丽
春和景丽 2020-11-30 08:41

How to inject dependencies into HttpSessionListener, using Spring and without calls, like context.getBean(\"foo-bar\") ?

3条回答
  •  北海茫月
    2020-11-30 09:16

    With Spring 4.0 but also works with 3, I implemented the example detailed below, listening to ApplicationListener and injecting the HttpSession https://stackoverflow.com/a/19795352/2213375

提交回复
热议问题