How do I get a HttpServletRequest in my spring beans?

前端 未结 6 1202
时光取名叫无心
时光取名叫无心 2020-12-01 01:48

I\'m developing an app with a Flex-based front end and a Spring/Hibernate back-end.

To get Facebook integration working in the way I\'ve got it currently, I need to

6条回答
  •  眼角桃花
    2020-12-01 02:47

    The @Context annotation (see answers in this question :What does context annotation do in Spring?) will cause it to be injected for you.

    I had to use

    @Context
    private HttpServletRequest request;
    

提交回复
热议问题