一、RequestContextHolder
, Anywhere using the following code:
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
Second, the injection method:
一、RequestContextHolder
, Anywhere using the following code:
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
Second, the injection method: