RequestContextHolder.currentRequestAttributes

J2EE 码拜 9年前 (2015-04-03) 3534次浏览 0个评论

RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes();这段代码是怎么用的?

RequestContextHolder.currentRequestAttributes
40分
它是Spring MVC框架内部工具,外界很少用到。
它的作用是Model在封装Request、Session的数据时,是通过RequestContextHolder.currentRequestAttributes()取得当前线程下的Request、Session的Attribute值。

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明RequestContextHolder.currentRequestAttributes
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!