springMVC怎么在controller中获取servletContext
展开全部
@RequestMapping(value="/download/{id}")
public void download(Model model,HttpServletRequest request,
@PathVariable("id") Integer id,HttpServletResponse response) throws Exception{
ServletContext servletContext = request.getServletContext();
}
public void download(Model model,HttpServletRequest request,
@PathVariable("id") Integer id,HttpServletResponse response) throws Exception{
ServletContext servletContext = request.getServletContext();
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询