前言
Spring Security 是一套基于Spring框架,旨在为基于javaEE的企业应用程序提供一个全面的解决方案。Spring Security在web方面的应用主要依赖于Servlet的Filter机制,通过组装一系列的FilterChain达到web会话请求的校验认证授权等一系列操作
入门Demo
引入POM依赖
本次使用SpringBoot+SpringSecurity进行Demo实现,SpringBoot
版本为2.4.4
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring