How do I get a HttpServletRequest in my spring beans?

前端 未结 6 1207
时光取名叫无心
时光取名叫无心 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:46

    Better way is to autowire with a constructor:

    private final HttpServletRequest httpServletRequest;
    
    public ClassConstructor(HttpServletRequest httpServletRequest){
          this.httpServletRequest = httpServletRequest;
    }
    

提交回复
热议问题