1、能干啥?
身份认证(你是谁?)、授权(能干啥?)、防止一些基本的攻击等
2、前提条件
jdk8.0以上
3、如何学习?
阅读官方文档
学习官方的示例项目
在https://stackoverflow.com 提问
在https://github.com/springing-projects/springing-security/issues 报告错误和增强请求
源码学习 https://github.com/spring-projects/spring-security/
4、参与项目的各种方式
回答关于StackOverflow的问题、
编写新代码、
改进现有代码、
协助编写文档、
开发示例或教程、
报告bug,
或者只是提出建议
在推特上可以了解到关于spring security的最新动态等消息
5、spring security 5.2的新特性(以下三个方面)
Servlet
增加了HTTP安全DSL中的嵌套构建器支持
WebFlux
Core
6、在spring boot中使用
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
7、不在spring boot中使用
<dependencyManagement>
<dependencies>
<!-- ... other dependency elements ... -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>5.2.7.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- ... other dependency elements ... -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
</dependencies>
8、具体功能
跨站请求伪造CSRF,前提是安全的方法需要是幂等的;
1、同步器令牌模式
2、SameSite属性