当前位置:   article > 正文

Spring Security 自定义登录页并开启CSRF防御,http.csrf()源码分析

http.csrf()

Spring Security 自定义登录页并开启CSRF防御,http.csrf()源码分析

环境Spring boot+Spring security+Thymeleaf+Maven

1.依赖

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <dependencies>
	 	 <!--spring security-->
	     <dependency>
	         <groupId>org.springframework.boot</groupId>
	         <artifactId>spring-boot-starter-security</artifactId>
	     </dependency>
	      <!--        模板引擎-->
	     <dependency>
	         <groupId>org.springframework.boot</groupId>
	         <artifactId>spring-boot-starter-thymeleaf</artifactId>
	     </dependency>
	     <!--        web依赖-->
	     <dependency>
	         <groupId>org.springframework.boot</groupId>
	         <artifactId>spring-boot
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/430904
推荐阅读
相关标签
  

闽ICP备14008679号