在非controller中获取HttpServletRequest (如在service中获取)

HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();

posted @ 2019-06-20 13:25  窦婴  阅读(1576)  评论(0编辑  收藏  举报