springboot中获取request对象

springboot中获取request对象

ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
posted @ 2022-03-18 19:55  codeSpiderMan  阅读(647)  评论(0)    收藏  举报