上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 53 下一页
摘要: 用于校验session是否过期 过期移除 初始化处:org.springframework.security.config.annotation.web.configurers.SessionManagementConfigurer#configure public void configure(H 阅读全文
posted @ 2021-11-10 20:00 意犹未尽 阅读(520) 评论(0) 推荐(0)
摘要: 最常用的一中过滤器,用于登录认证 http.formLogin() 初始化 类图 AbstractAuthenticationProcessingFilter负责 认证成功和认证失败的调度 提供抽象方法attemptAuthentication 具体的认证逻辑由子类实现 <1> org.sprin 阅读全文
posted @ 2021-11-10 19:05 意犹未尽 阅读(393) 评论(0) 推荐(0)
摘要: 负责处理登出相关逻辑,默认url映射是/logout org.springframework.security.config.annotation.web.configurers.LogoutConfigurer 初始化 默认初始化处https://chuna2.787528.xyz/LQBlog/p/ 阅读全文
posted @ 2021-11-10 15:22 意犹未尽 阅读(507) 评论(0) 推荐(0)
摘要: 提供我们在Filter链 执行之前或者之后往Header写入内容 通过HttpSecurity 可以指定 默认是在之后调用 http.headers().addHeaderWriter() 通过org.springframework.security.config.annotation.web.co 阅读全文
posted @ 2021-11-10 10:39 意犹未尽 阅读(537) 评论(0) 推荐(0)
摘要: 主要是在认证 Filter链执行之前 维护SecurityContextHolder 方便我们后续通过SecurityContextHolder.getContext()获取当前会话用户信息 通过SecurityContextConfigurer初始化 默认设置源码处:https://www.cnb 阅读全文
posted @ 2021-11-09 16:49 意犹未尽 阅读(1096) 评论(0) 推荐(0)
摘要: 作用 我们获取当前登录用户信息是根据SecurityContextHolder.getContext()获取的,SecurityContextHolder.getContext()本质是ThreadLocal实现 Spring MVC WebAsyncTask是异步另外一个线程 所以用于保证我们在T 阅读全文
posted @ 2021-11-09 14:15 意犹未尽 阅读(436) 评论(0) 推荐(0)
摘要: 说明 线上出现异常,但是查看节点状态正常,因为使用了容器,挂掉了会重启。因为jvm配置了-XX:HeapDumpOnOutOfMemoryError 参数,出现OMM就会将当时线程和jvm内存情况转存起来可参考:jmv参数配置 排查 1.将运维发过来的hprof导入到 vm 可参考 直通车 3.我们 阅读全文
posted @ 2021-11-06 10:55 意犹未尽 阅读(696) 评论(0) 推荐(0)
摘要: 时序图 @startuml participant "security starter" as sb participant "WebSecurityConfiguration" as wc participant "webSecurity" as ws participant "WebSecuri 阅读全文
posted @ 2021-11-04 15:04 意犹未尽 阅读(1680) 评论(0) 推荐(0)
摘要: 基于注解 需要配置启用@EnableGlobalMethodSecurity(prePostEnabled = true,securedEnabled = true) prePostEnabled: 确定 前置注解[@PreAuthorize,@PostAuthorize,..] 是否启用 secu 阅读全文
posted @ 2021-11-03 19:27 意犹未尽 阅读(185) 评论(0) 推荐(0)
摘要: 说明 ConfigurationClassPostProcessor.class主要解决的问题就是去处理spring定义的一些配置注解,例如@Configuration,@Import,@ComponentScan,@Bean等。 源码调用时机从https://chuna2.787528.xyz/LQB 阅读全文
posted @ 2021-10-30 15:57 意犹未尽 阅读(178) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 53 下一页