spring secuirty简单项目创建及基于wireshark抓包的浏览器端和服务器端之间的通讯交互的分析
1.环境
Spring tool suite :Version: 4.1.2.RELEASE 集成开发工具
Maven:3.5.4 依赖管理工具
Springboot:2.1.4.RELEASE
Wireshark:Version 2.4.5 通信协议抓包分析工具
HTTP Request Editor: V1.0 HTTP请求模拟工具
Google Chrome: 74.0.3729.169(正式版本) (32 位) google浏览器
Microsoft Edge :44.18362.329.0 微软浏览器
2.创建一个简单的spring security项目
2.1.向导创建工程
备注:这步骤请选择2.1.4,否则可能pom.xml会出现第一行报错。
点击后状态栏会显示下载模板,生成项目骨架的进度
查看pom.xml,看到自动引入了以下依赖:
其中secuirty相关的2个依赖是:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security