springBoot和spring security版本对应关系详解

 更新时间:2026年03月14日 09:27:05   作者:快乐的小三菊  
文章主要介绍了Spring Boot和Spring Security之间的版本对应关系,通过整理不同版本的依赖关系,帮助开发者更好地理解和使用这两个框架

一、背景

最近在看 spring security,发现没有一个明确的 springbootspring security 版本的对应关系,由于 spring security 不同版本之间的差异很大,导致写出来的代码不能按照预期的效果展示,所以我就整理了一下两者之间的版本对应关系。

今天是 2021年11月23日,最新稳定版本的spring boot2.3.12.RELEASE 版本,如果想查看所有的 spring boot 版本,请查询这个地址

二、配置相关依赖

在我们的 pom.xml 中,可以通过这种方式引入 spring security 的依赖,如下所示:

<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 
	http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>com</groupId>
	<artifactId>SpringBoot</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>
	<name>myName</name>
	<url>www.funtl.com</url>
	
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.14.RELEASE</version>
	</parent>
	
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<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>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>

三、版本对应关系

springboot 版本

spring security版本

2.3.12.RELEASE5.3.9.RELEASE
2.3.11.RELEASE5.3.9.RELEASE
2.3.10.RELEASE5.3.9.RELEASE
2.3.9.RELEASE5.3.8.RELEASE
2.3.8.RELEASE5.3.6.RELEASE
2.3.7.RELEASE5.3.6.RELEASE
2.3.6.RELEASE5.3.5.RELEASE
2.3.5.RELEASE5.3.5.RELEASE
2.3.4.RELEASE5.3.4.RELEASE
2.3.3.RELEASE5.3.4.RELEASE
2.3.2.RELEASE5.3.3.RELEASE
2.3.1.RELEASE5.3.3.RELEASE
2.3.0.RELEASE5.3.2.RELEASE
2.2.13.RELEASE5.2.8.RELEASE
2.2.12.RELEASE5.2.8.RELEASE
2.2.11.RELEASE5.2.7.RELEASE
2.2.10.RELEASE5.2.6.RELEASE
2.2.9.RELEASE5.2.5.RELEASE
2.2.8.RELEASE5.2.5.RELEASE
2.2.7.RELEASE5.2.4.RELEASE
2.2.6.RELEASE5.2.2.RELEASE
2.2.5.RELEASE5.2.2.RELEASE
2.2.4.RELEASE5.2.1.RELEASE
2.2.3.RELEASE5.2.1.RELEASE
2.2.2.RELEASE5.2.1.RELEASE
2.2.1.RELEASE5.2.1.RELEASE
2.2.0.RELEASE5.2.0.RELEASE
2.1.18.RELEASE5.1.13.RELEASE
2.1.17.RELEASE5.1.12.RELEASE
2.1.16.RELEASE5.1.11.RELEASE
2.1.15.RELEASE5.1.11.RELEASE
2.1.14.RELEASE5.1.10.RELEASE
2.1.13.RELEASE5.1.8.RELEASE
2.1.12.RELEASE5.1.7.RELEASE
2.1.11.RELEASE5.1.7.RELEASE
2.1.10.RELEASE5.1.7.RELEASE
2.1.9.RELEASE5.1.6.RELEASE
2.1.8.RELEASE5.1.6.RELEASE
2.1.7.RELEASE5.1.6.RELEASE
2.1.6.RELEASE5.1.5.RELEASE
2.1.5.RELEASE5.1.5.RELEASE
2.1.4.RELEASE5.1.5.RELEASE
2.1.3.RELEASE5.1.4.RELEASE
2.1.2.RELEASE5.1.3.RELEASE
2.1.1.RELEASE5.1.2.RELEASE
2.1.0.RELEASE5.1.1.RELEASE
2.0.9.RELEASE5.0.12.RELEASE
2.0.8.RELEASE5.0.11.RELEASE
2.0.7.RELEASE5.0.10.RELEASE
2.0.6.RELEASE5.0.9.RELEASE
2.0.5.RELEASE5.0.8.RELEASE
2.0.4.RELEASE5.0.7.RELEASE
2.0.3.RELEASE5.0.6.RELEASE
2.0.2.RELEASE5.0.5.RELEASE
2.0.1.RELEASE5.0.4.RELEASE
2.0.0.RELEASE5.0.3.RELEASE
1.5.22.RELEASE4.2.13.RELEASE
1.5.21.RELEASE4.2.12.RELEASE
1.5.20.RELEASE4.2.12.RELEASE
1.5.19.RELEASE4.2.11.RELEASE
1.5.18.RELEASE4.2.10.RELEASE
1.5.17.RELEASE4.2.9.RELEASE
1.5.16.RELEASE4.2.8.RELEASE
1.5.15.RELEASE4.2.7.RELEASE
1.5.14.RELEASE4.2.7.RELEASE
1.5.13.RELEASE4.2.6.RELEASE
1.5.12.RELEASE4.2.5.RELEASE
1.5.11.RELEASE4.2.5.RELEASE
1.5.10.RELEASE4.2.4.RELEASE
1.5.9.RELEASE4.2.3.RELEASE
1.5.8.RELEASE4.2.3.RELEASE
1.5.7.RELEASE4.2.3.RELEASE
1.5.6.RELEASE4.2.3.RELEASE
1.5.5.RELEASE4.2.3.RELEASE
1.5.4.RELEASE4.2.3.RELEASE
1.5.3.RELEASE4.2.2.RELEASE
1.5.2.RELEASE4.2.2.RELEASE
1.5.1.RELEASE4.2.1.RELEASE
1.5.0.RELEASE4.2.1.RELEASE
1.4.7.RELEASE4.1.4.RELEASE
1.4.6.RELEASE4.1.4.RELEASE
1.4.5.RELEASE4.1.4.RELEASE
1.4.4.RELEASE4.1.4.RELEASE
1.4.3.RELEASE4.1.4.RELEASE
1.4.2.RELEASE4.1.3.RELEASE
1.4.1.RELEASE4.1.3.RELEASE
1.4.0.RELEASE4.1.1.RELEASE
1.3.8.RELEASE4.0.4.RELEASE
1.3.7.RELEASE4.0.4.RELEASE

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

相关文章

  • Java日志软件Log4j的基本使用教程

    Java日志软件Log4j的基本使用教程

    这篇文章主要介绍了Java日志软件Log4j的基本使用教程,包括回滚和发送日志邮件等基本功能使用的讲解,需要的朋友可以参考下
    2015-12-12
  • Java源码跟踪阅读技巧【值得收藏】

    Java源码跟踪阅读技巧【值得收藏】

    今天跟大家分享一下我平时阅读源码的几个小技巧,对于阅读Java中间件如Spring、Dubbo等框架源码的同学有一定帮助。本文基于Eclipse IDE,感兴趣的朋友跟随小编一起看看吧
    2018-11-11
  • Java Bluetooth 蓝牙通讯 BlueCove 扫描附近的蓝牙设备(测试代码)

    Java Bluetooth 蓝牙通讯 BlueCove 扫描附近的蓝牙设备(测试代码)

    BlueCove是一个开源的蓝牙协议栈实现,旨在为Java开发者提供一个全面的、易于使用的API,从而在应用程序中实现蓝牙功能,该项目支持多种操作系统,这篇文章主要介绍了Java Bluetooth 蓝牙通讯 BlueCove 扫描附近的蓝牙设备,需要的朋友可以参考下
    2025-01-01
  • SpringMVC MVC架构与Servlet使用详解

    SpringMVC MVC架构与Servlet使用详解

    MVC设计模式一般指 MVC 框架,M(Model)指数据模型层,V(View)指视图层,C(Controller)指控制层。使用 MVC 的目的是将 M 和 V 的实现代码分离,使同一个程序可以有不同的表现形式。其中,View 的定义比较清晰,就是用户界面
    2022-10-10
  • Mybatis如何通过注解开启使用二级缓存

    Mybatis如何通过注解开启使用二级缓存

    这篇文章主要介绍了Mybatis基于注解开启使用二级缓存,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
    2019-11-11
  • MultipartFile文件判断是否存在的操作

    MultipartFile文件判断是否存在的操作

    这篇文章主要介绍了MultipartFile文件判断是否存在的操作,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教
    2021-07-07
  • SpringBoot设置首页(默认页)跳转功能的实现方案

    SpringBoot设置首页(默认页)跳转功能的实现方案

    这篇文章主要介绍了SpringBoot设置首页(默认页)跳转功能,本文通过两种方案,给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
    2019-07-07
  • Java如何使用Query动态拼接SQL详解

    Java如何使用Query动态拼接SQL详解

    这篇文章主要给大家介绍了关于Java如何使用Query动态拼接SQL的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2019-01-01
  • SpringCloud GateWay路由网关与Config配置中心详解

    SpringCloud GateWay路由网关与Config配置中心详解

    文章主要介绍了SpringCloud Gateway路由网关的部署与配置,包括添加路由、配置路由过滤器、编写全局过滤器等步骤,还介绍了配置中心的使用方法,包括创建配置中心和客户端配置,以及CAP理论的应用场景和特点,感兴趣的朋友跟随小编一起看看吧
    2026-03-03
  • SpringBoot如何自定义线程池配置类

    SpringBoot如何自定义线程池配置类

    有时候我们在项目中做一些长链路的跑批任务时,基于Springboot项目的定时任务,我们可以指定一个自定义的线程配置类进行单独提供给具体跑批任务使用,而不占用整个系统资源,这篇文章主要介绍了SpringBoot如何自定义线程池配置类,需要的朋友可以参考下
    2024-04-04

最新评论