The meaning of the version numbers of SpringBoot and Spring Security

1. Digital version number:

1.1 Meaning:

        Taking Spring Boot 2.1.5 as an example, the meanings are: version -> main version number. sub version number. revised version number . The specific explanation is as follows:

        a, 2 indicates the main version number , indicating that it is our second- generation Spring Boot product.

        b. 1 indicates the minor version number , some new functions have been added , but the main structure has not changed and is compatible.

        c and 5 represent bug fix versions.

        d. So Spring Boot 2.1.5 is the fifth bug fix version of the first minor version of the second generation version of Spring Boot .

1.2 Incremental rules:

        Through the above explanation, we can know that the version of SpringBoot 1.x and SpringBoot 2.x cannot be upgraded directly through the version number, but if you want to upgrade from version 2.1.5 to version 2.2.6 , Simply modify the next version and you can upgrade successfully.

type

explain

major version number When you make incompatible API changes or make major adjustments .
subversion number When you make functional enhancements that are backward compatible .
Amendment No When you do a backward compatibility bugfix .

2. Text version number:

        When we use the version, we find that many versions are followed by a suffix, such as .RELEASE , what does this mean? Let's sort out the suffix information and explanations that may be encountered, as follows:

meaning

explain

snapshot snapshot
alpha closed beta
beta Beta
release stable version
GA most stable version
Final formal edition
Pro(professional) Professional Edition
Plus Enhanced Edition
Retail retail version
Demo demo version
Build Internal label
Delux Deluxe Edition
Corporation或Enterpraise Enterprise Edition
M1、M2、M3 milestone
RC Almost no new features will be added, and the main focus will be on debugging.
SR Modified version
Trial trial version
Shareware shared version
Full Full version

        Here are a few commonly used nouns:

meaning

explain

build - snapshot The development version , also known as the snapshot version ,. The current version is under development . After the development is completed, test it yourself, and let other members of the team also test it.
M1....M2 Milestone versions , before the release of the version, there will be several milestone versions. Using the snapshot version to develop for a while, I feel that the code written recently is good, so set a few milestones and record it! Record this momentous moment.
RC1 ....RC2 release candidate . The internal development has reached a certain stage. After each module is inherited, the entire development team feels that the software is stable and no problem after careful testing, and it can be released to the outside world.
release Official version . After the release candidates are almost ready, it means that the entire framework has reached a certain stage and can be put into the market for large-scale use, so it will be released for everyone to use.
SR1 .... SR2 revised version . After the official version is released, users find problems, and architects fix these bugs , that is, fix the problems of the release version. At this time, the versions of each iteration are SR1 , SR2 , and SR3 .

        According to the above explanation, the release order of the entire version is:

        1. snapshot : the development version ( BS ), when the development reaches a small stage, it must be marked.

       2. M1 .... MX : Milestone version ( MX ), the version has reached a relatively stable stage and can be released to the public, but there may still be problems with repairs. At this time, only repairs will be made, and new functions will not be developed.

        3. RC1....RCX : Release Candidate ( RC1 ), bug fix completed, released.

        4. Release : The official version ( release ), there are some problems reported by the outside world, and internal repairs will be carried out.

        5、SR1 .... SRX: 修正版本(SRX)。

总结:

        截至到目前为止,我们可以看到的版本号应该是这个样子:版本格式 -> 主版本号.子版本号.修正版号.软件版本阶段

三、英文标识:

        我们经常在网站上发现些标着 CURRENTPRE 等等的标识,这些又是什么意思呢?如下所示:

含义

解释

CURRENT 当前推荐的版本
GA 稳定版,可用于生产
PRE 里程碑版 / 预览版本
SNAPSHOT 快照

        这里只是一个标识,方便大家在使用的时候选择版本,我们一般的选择是 CURRENTGA 版本, SNAPSHOT 打死不能选。

四、Spring Cloud 版本说明:

        spring cloud 的发布版本是以伦敦地铁作为版本命名,并按照地铁站的首字母 A - Z 依次命名。如下所示,但是在 2020 年,又改为了日历化版本。这里不做过多的介绍。

含义

解释

Angle 第一代版本
Brixton 第二代版本
Camden 第三代版本
Dalston 第四代版本
Edgware 第五代版本
Finchley 第六代版本
GreenWich 第七代版本
Hoxton 第八代版本

        为什么我们的 spring cloud 会以这种方式来发布版本?因为假如我们发布的是传统的版本如 2.1.5.release spring cloud 会包含很多子项目的版本就会给人造成混乱。

        我们可以这么理解,使用英文版本的命名方式,就是为了统一管理 spring cloud 下的子项目版本集合。否则会造成版本混乱。

五、举例:

5.1、spring boot 版本真相:

        今天是 2021 年 11 月 24 日,我们进入到 spring boot 官网上,查看目前最新的 spring boot 的版本信息,如下图所示:

5.1.1、2.6.0 CURRENT GA:

        其中 2.6.0 表示的意思是这是第二代 spring boot 的第 6 个小版本的第 0 bug 修复。CURRENT 的意思是这是官网推荐使用的版本GA 的意思是这是稳定版本,可用于生产环境。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.0.RELEASE</version>
</parent>

        我们通过观察可以发现,在引入的依赖中,并没有 CURRENTGA ,这两个标签就是告知我们这些使用 spring boot 的人:spring boot 2.6.0 版本现在是一个稳定的版本(GA),可用于生产环境了,官网大力推荐进行使用。

5.1.2、2.6.1-SNAPSHOT:

        其中的 2.6.1 表示的意思是这是第二代 spring boot 的第 6 个小版本的第 1 bug 修复。SNAPSHOT 的意思是这是我们内部在开发的一个版本,也是对于 2.6.0 版本的 bug 迭代版本。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.6.1.BUILD-SNAPSHOT</version>
</parent>

5.1.3、2.5.7 GA:

        其中的 2.5.7 表示的意思是这是第二代 spring boot 的第 5 个小版本的第 7 次 bug 修复。GA 的意思是这是稳定版本,可用于生产。

        2.5.72.6.0 版本差别在于 2.6.0 多了一个 CURRENT 标识,说明官方更推荐 2.6.0 版本,如果你当前使用的是 2.5.7 版本的话,也是稳定的版本,官网也在修复此版本存在的问题。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.7.RELEASE</version>
</parent>

5.1.4、2.3.0 M2 PRE:

         再拓展一个上面官网没有的版本,可实际我们可能用得上的版本,其中的 2.3.0 表示的意思是这是第spring boot 的第 3 个小版本的第 0 次 bug 修复。M2 的意思是这是 2.3.0 版本的第二次里程碑版本PRE 的意思是里程碑版本 / 预览版本,告知我们这是个里程碑版本,喜欢尝试的人可以先来。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.0.M2</version>
</parent>

        我们曾经说过,里程碑版本是记录内部开发的版本,所以,如果是上面这么引入的话,是无法使用的,因为还未发布到官网上,那么现在使用的话,需要添加仓库,如下所示:

    <repositories>
        <repository>
            <id>spring-snapshots</id>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <url>https://repo.spring.io/snapshot</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </pluginRepository>
    </pluginRepositories>

5.2 spring cloud 版本真相:

         今天是 2021 年 11 月 24 日,我们进入到 spring cloud 官网上,查看目前最新的 spring cloud 的版本信息,如下图所示:

5.2.1、2020.0.4 CURRENT GA:

        2020.0.4 的意思是这是 spring cloud 2020 年第 0 个小版本的第 4bug 修复版本,CURRENT 的意思是这是官网推荐使用的版本GA 的意思是这是稳定版本,可用于生产环境。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>2020.0.4</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

5.2.2、2021.0.0-SNAPSHOT:

        2021.0.0 的意思是这是 spring cloud 2021 年第 0 个小版本的第 0 次 bug 修复版本,

SNAPSHOT 的意思是这是我们内部在开发的一个版本。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>2021.0.0-SNAPSHOT</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

        由于这个也是未发布版本,也需要添加相同的仓库,如下所示: 

    <repositories>
        <repository>
            <id>spring-snapshots</id>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <url>https://repo.spring.io/snapshot</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/milestone</url>
        </pluginRepository>
    </pluginRepositories>

5.2.3、2021.0.0-RC1 PRE:

        2021.0.0 的意思是这是 spring cloud 2021 年第 0 个小版本的第 0 次 bug 修复版本,

RC1 的意思是这是我们发布候选的一个版本PRE 的意思是里程碑版本 / 预览版本,告知我们这是个里程碑版本,喜欢尝试的人可以先来。

        那么该如何引入到我们的生产环境中呢?需要配置如下依赖:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2021.0.0-RC1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth-otel-dependencies</artifactId>				
            <version>1.0.0-M1</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

        由于这个也是未发布版本,也需要添加相同的仓库,如下所示: 

        <repositories>
			<repository>
				<id>spring-snapshots</id>
				<url>https://repo.spring.io/snapshot</url>
				<snapshots><enabled>true</enabled></snapshots>
			</repository>
			<repository>
				<id>spring-milestones</id>
				<url>https://repo.spring.io/milestone</url>
			</repository>
		</repositories>
		<pluginRepositories>
			<pluginRepository>
				<id>spring-snapshots</id>
				<url>https://repo.spring.io/snapshot</url>
			</pluginRepository>
			<pluginRepository>
				<id>spring-milestones</id>
				<url>https://repo.spring.io/milestone</url>
			</pluginRepository>
		</pluginRepositories>

5.2.4、Hoxton.SR12 GA:

        Honton 的意思是这是第spring cloud 版本,SR12 表示这是修正版本,修正了 12 次,说明 release 之后,进行了 12 次的问题修复。GA 的意思是这是稳定版本,可用于生产。

        那么该如何引入到我们的生产环境中呢?只需要配置如下依赖即可:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>Hoxton.SR12</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

Guess you like

Origin blog.csdn.net/xhf852963/article/details/121511149