BeanFactory not initialized or already closed - call 'refresh' before accessing beans

前端 未结 7 1347
太阳男子
太阳男子 2021-01-03 23:09

I\'m trying to add spring security to a regular JSF application. After repeated tries and I\'m failing with the following error on tomcat bring-up.

Here is the entir

7条回答
  •  佛祖请我去吃肉
    2021-01-03 23:49

    You need to add RequestContextListener to your web.xml what it does is namely bind the HTTP request object to the Thread that is servicing that request. This makes beans which are request- and session-scoped available further down the call chain.

    
        org.springframework.web.context.request.RequestContextListener
    
    

提交回复
热议问题