How do I get a HttpServletRequest in my spring beans?

前端 未结 6 1206
时光取名叫无心
时光取名叫无心 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条回答
  •  萌比男神i
    2020-12-01 02:42

    @eeezyy's answer didn't work for me, although I'm using Spring Boot (2.0.4) and it may differ, but a variation here in 2018 works thus:

    @Autowired
    private HttpServletRequest request;
    

提交回复
热议问题