How to set ServletContext property for a bean in Spring XML metadata configuration

后端 未结 4 2097
名媛妹妹
名媛妹妹 2021-01-14 23:14

I tried searching here on SO but i couldn\'t find a solution. I have some XML metadata like the following.



        
4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-14 23:59

    Just autowire the context in your controller:

    @Autowired
    private ServletContext context;
    

提交回复
热议问题