I tried searching here on SO but i couldn\'t find a solution. I have some XML metadata like the following.
Just autowire the context in your controller:
@Autowired private ServletContext context;