SecurityUtils.getSubject().getSession().getAttribute
时间: 2023-12-23 09:05:57 浏览: 148
SecurityUtils.getSubject().getSession().getAttribute可以用于获取当前Subject的Session中的属性值。Shiro提供了Subject对象来与当前执行的用户进行交互,通过调用getSession()方法可以获取到当前用户的Session对象,然后可以使用getAttribute()方法来获取Session中的属性值。在配置文件中,可以通过sessionDAO来配置Session的数据访问对象,从而实现对Session的管理。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [12.Shiro会话管理](https://blog.csdn.net/qq_36468169/article/details/102828492)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [org.apache.shiro.SecurityUtils.getSubject().getSession()](https://blog.csdn.net/bitree1/article/details/50498970)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文