controller中获取当前项目物理绝对路径

用HttpServletRequest request获取 

request.getSession().getServletContext().getRealPath("");

上面马赛克的就是项目名称

猜你喜欢

转载自www.cnblogs.com/xiaostudy/p/10956401.html