获取request:
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
1
获取session:
HttpSession session = request.getSession();
1
获取servletContext
ServletContext application = session.getServletContext();
---------------------
作者:大浪中航行
来源:CSDN
原文:https://blog.csdn.net/dalangzhonghangxing/article/details/64443039
版权声明:本文为博主原创文章,转载请附上博文链接!