java方法内实例化获取HttpServletRequest

        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        HttpServletRequest request = attributes.getRequest();

 

posted @ 2021-11-25 11:02  _Lawrence  阅读(778)  评论(0编辑  收藏  举报