摘要: 登录成功后,如果我们没有使用框架的话,用户信息会保存在HttpSession中,Spring Security实质是对HttpSession进行了封装,我们可以直接从HttpSession中获取信息,也可以采用Spring Security提供的方法 (1)从SecurityContextHolde 阅读全文
posted @ 2021-05-19 23:20 刚刚好。 阅读(3133) 评论(0) 推荐(1)
摘要: @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter{ @Override protected void configure(HttpSecurity http) throws Exceptio 阅读全文
posted @ 2021-05-19 21:37 刚刚好。 阅读(872) 评论(0) 推荐(1)
摘要: ##快速入门 1.引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 2.编写control 阅读全文
posted @ 2021-05-19 15:42 刚刚好。 阅读(739) 评论(0) 推荐(2)
摘要: 原理 是基于责任链的方式 WebAsyncManagerIntegrationFilter:将 Security 上下文与 Spring Web 中用于处理异步请求映射的 WebAsyncManager 进行集成。 SecurityContextPersistenceFilter:在每次请求处理之前 阅读全文
posted @ 2021-05-19 13:50 刚刚好。 阅读(1050) 评论(0) 推荐(2)