前言
基于SpringSecurity 5.1.6.RELEASE进行登录认证源码分析
1、引入库
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
2、以debug形式启动项目
![](https://img-blog.csdnimg.cn/20210916154928405.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBARHJvcE9mSnVwaXRlcg==,size_20,color_FFFFFF,t_70,g_se,x_16)
在浏览器输入http://localhost:8080/,打断点查看
看到每个请求需要经过spring security的拦截