springsecurity servletcontext
时间: 2023-08-11 19:07:24 浏览: 104
在Spring Security中,ServletContext是一个全局的对象,用于在整个Web应用程序中共享信息。它可以通过SecurityContextPersistenceFilter来管理。当过滤器链执行到SecurityContextPersistenceFilter时,它会从HttpSession中获取SecurityContext对象,并将其存储在SecurityContextHolder中。在请求结束后,SecurityContext会再次存储在HttpSession中,并清除SecurityContextHolder中的SecurityContext对象。这样可以确保在整个请求过程中,安全上下文的信息得到正确的管理和存储。\[3\]
#### 引用[.reference_title]
- *1* [SpringSecurity源码分析(一) SpringBoot集成SpringSecurity即Spring安全框架的加载过程](https://blog.csdn.net/xl649138628/article/details/128993678)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [spring security 会话管理](https://blog.csdn.net/swadian2008/article/details/126566676)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [SpringSecurity原理:探究SpringSecurity运作流程](https://blog.csdn.net/Leon_Jinhai_Sun/article/details/126909196)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文