springboot#获取HttpServletRequest
作者:互联网
不想通过传参的方式传递HttpServletRequest时候,以及复写某些方法的时候,想用到HttpServletRequest
,怎么办? 看这里就够了。
// spring中最直接的方式是 HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
标签:HttpServletRequest,传参,springboot,RequestContextHolder,spring,获取,复写 来源: https://www.cnblogs.com/luohaonan/p/12486095.html