Spring Security中的FilterInvocation

Holds objects associated with a HTTP filter.
Guarantees the request and response are instances of HttpServletRequest and HttpServletResponse, and that there are no null objects.

Required so that security system classes can obtain access to the filter environment, as well as the request and response.

大概意思是:通过Spring Security 封装,可以安全的拿到HttpServletRequest 和 HttpServletResponse对象

项目中用到了 getRequestUrl() 获取请求url

String requestUrl = ((FilterInvocation) object).getRequestUrl();
发布了22 篇原创文章 · 获赞 9 · 访问量 3736

猜你喜欢

转载自blog.csdn.net/king101125s/article/details/104199975