SpringBoot与SpringCloud的版本对应详细版

发布时间 2023-12-18 16:57:45作者: 小小的编程员

最新的使用 版本兼容


  <!-- 统一管理jar包版本 -->
  <properties>
    <spring-cloud.version>2021.0.5</spring-cloud.version>
    <spring-boot.version>2.7.6</spring-boot.version>
  </properties>

SpringBoot与SpringCloud的版本对应详细版

撸码狂魔吖 于 2020-03-23 17:13:01 发布

阅读量4.6w 收藏 76

点赞数 13

分类专栏: java 文章标签: java

原文链接:https://www.cnblogs.com/zhuwenjoyce/p/10261079.html

版权

java 专栏收录该内容

6 篇文章 0 订阅

订阅专栏

`

1.  作者:梦幻朵颜 
    
2.  出处:https://www.cnblogs.com/zhuwenjoyce/
    

4.  你的一个点赞,一句留言,都将是博主的前进动力!!! 
    

6.  版权:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
    

`


SpringBoot与SpringCloud的版本对应详细版

大版本对应:

Spring Boot Spring Cloud
1.2.x Angel版本
1.3.x Brixton版本
1.4.x stripes Camden版本
1.5.x Dalston版本、Edgware版本
2.0.x Finchley版本
2.1.x Greenwich.SR2

在实际开发过程中,我们需要更详细的版本对应  (https://start.spring.io/actuator/info)

spring-boot-starter-parent spring-cloud-dependencies
版本号 发布日期
--- ---
1.5.2.RELEASE 2017年3月
1.5.9.RELEASE 2017年11月
1.5.16.RELEASE
1.5.20.RELEASE
Spring Boot >=2.0.0.M3 and <2.0.0.M5
Spring Boot >=2.0.0.M5 and <=2.0.0.M5
Spring Boot >=2.0.0.M6 and <=2.0.0.M6
Spring Boot >=2.0.0.M7 and <=2.0.0.M7
Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1
Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2
Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE
Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE
Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE
Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT
Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3
Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE
Spring Boot >=2.1.0.RELEASE and <2.1.9.BUILD-SNAPSHOT
Spring Boot >=2.1.9.BUILD-SNAPSHOT and <2.2.0.M4
Spring Boot >=2.2.0.M4 and <=2.2.0.M5
Spring Boot >=2.2.0.BUILD-SNAPSHOT
待更新...

spring官方对应查看网址:https://start.spring.io/actuator/info

复制代码

spring-cloud    
Finchley.M2                     "Spring Boot >=2.0.0.M3 and <2.0.0.M5"
Finchley.M3                     "Spring Boot >=2.0.0.M5 and <=2.0.0.M5"
Finchley.M4                     "Spring Boot >=2.0.0.M6 and <=2.0.0.M6"
Finchley.M5    "Spring Boot >=2.0.0.M7 and <=2.0.0.M7"
Finchley.M6    "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1"
Finchley.M7    "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2"
Finchley.M9    "Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE"
Finchley.RC1    "Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE"
Finchley.RC2    "Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE"
Finchley.SR4    "Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT"
Finchley.BUILD-SNAPSHOT    "Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3"
Greenwich.M1    "Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE"
Greenwich.SR2    "Spring Boot >=2.1.0.RELEASE and <2.1.9.BUILD-SNAPSHOT"
Greenwich.BUILD-SNAPSHOT    "Spring Boot >=2.1.9.BUILD-SNAPSHOT and <2.2.0.M4"
Hoxton.M2    "Spring Boot >=2.2.0.M4 and <=2.2.0.M5"
Hoxton.BUILD-SNAPSHOT    "Spring Boot >=2.2.0.BUILD-SNAPSHOT"

复制代码

**spring-cloud-dependencies **版本列表可查看:

https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies

**spring-boot-starter-parent **版本列表可查看:

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent

在SpringCloud中,1.X和2.X版本在pom.xml中引入的jar包名字都不一样,比如有的叫spirng-cloud-starter-hystrix 有的叫spring-cloud-netflix-hystrix,维护起来会比较困难。

1.x版本pom.xml里几个基本用到的jar长这样:

`

1.  <project xmlns="http://maven.apache.org/POM/4.0.0"
    
2.      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    
3.      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    
4.      <modelVersion>4.0.0</modelVersion>
    
5.      <groupId>com.joyce</groupId>
    
6.      <artifactId>joyce-test</artifactId>
    
7.      <version>1.0</version>
    
8.      <packaging>jar</packaging>
    

10.      <parent>
    
11.          <groupId>org.springframework.boot</groupId>
    
12.          <artifactId>spring-boot-starter-parent</artifactId>
    
13.          <version>1.5.9.RELEASE</version>
    
14.          <relativePath /> 
    
15.      </parent>
    

17.      <dependencyManagement>
    
18.          <dependencies>
    
19.              <dependency>
    
20.                  <groupId>org.springframework.cloud</groupId>
    
21.                  <artifactId>spring-cloud-dependencies</artifactId>
    
22.                  <version>Edgware.RELEASE</version>
    
23.                  <type>pom</type>
    
24.                  <scope>import</scope>
    
25.              </dependency>
    
26.          </dependencies>
    
27.      </dependencyManagement>
    

29.      <properties>
    
30.          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    
31.      </properties>
    

33.      <dependencies>
    
34.          <dependency>
    
35.              <groupId>org.springframework.cloud</groupId>
    
36.              <artifactId>spring-cloud-starter-feign</artifactId>
    
37.          </dependency>
    
38.          <dependency>
    
39.              <groupId>org.springframework.cloud</groupId>
    
40.              <artifactId>spring-cloud-starter-hystrix</artifactId>
    
41.          </dependency>
    
42.          <dependency>
    
43.              <groupId>org.springframework.cloud</groupId>
    
44.              <artifactId>spring-cloud-starter-zipkin</artifactId>
    
45.          </dependency>
    
46.          <dependency>
    
47.              <groupId>org.springframework.cloud</groupId>
    
48.              <artifactId>spring-cloud-starter-eureka</artifactId>
    
49.          </dependency>
    
50.          <dependency>
    
51.              <groupId>org.springframework.boot</groupId>
    
52.              <artifactId>spring-boot-starter-actuator</artifactId>
    
53.          </dependency>
    
54.          <dependency>
    
55.              <groupId>org.springframework.boot</groupId>
    
56.              <artifactId>spring-boot-starter-web</artifactId>
    
57.              <exclusions>
    
58.                  <!-- 排除spring boot默认使用的tomcat,使用jetty -->
    
59.                  <exclusion>
    
60.                      <groupId>org.springframework.boot</groupId>
    
61.                      <artifactId>spring-boot-starter-tomcat</artifactId>
    
62.                  </exclusion>
    
63.              </exclusions>
    
64.          </dependency>
    
65.          <dependency>
    
66.              <groupId>org.springframework.boot</groupId>
    
67.              <artifactId>spring-boot-starter-jetty</artifactId>
    
68.          </dependency>
    
69.          <dependency>
    
70.              <groupId>org.springframework.cloud</groupId>
    
71.              <artifactId>spring-cloud-starter-ribbon</artifactId>
    
72.          </dependency>
    
73.          <dependency>
    
74.              <groupId>org.springframework.boot</groupId>
    
75.              <artifactId>spring-boot-starter-test</artifactId>
    
76.              <scope>test</scope>
    
77.          </dependency>
    
78.      </dependencies>
    
79.  </project>
    

`

![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)


在SpringBoot 1.5.9.RELEASE 版本中,junit测试类模版长这样:

`

1.  import org.junit.Test;
    
2.  import org.junit.runner.RunWith;
    
3.  import org.slf4j.LoggerFactory;
    
4.  import org.springframework.beans.factory.annotation.Autowired;
    
5.  import org.springframework.boot.test.context.SpringBootTest;
    
6.  import org.springframework.test.context.junit4.SpringRunner;
    
7.  import org.springframework.web.client.RestTemplate;
    

9.  @RunWith(SpringRunner.class)
    
10.  @SpringBootTest(classes=MyApplication.class)
    
11.  public class MyApplicationTest {
    
12.      private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MyApplicationTest.class);
    

14.      @Autowired
    
15.      private RestTemplate restTemplate;
    
16.      @Test
    
17.      public void test() {
    
18.          System.out.println("ok!!!");
    
19.      }
    
20.      @Test
    
21.      public void orderName() {
    
22.          try {
    
23.              String name = "joyce";
    
24.              String rr = restTemplate.getForObject("http://joyce-user/orderName?name="+name, String.class);
    
25.              LOG.info("rr====" + rr);
    
26.          } catch (Exception e) {
    
27.              e.printStackTrace();
    
28.          }
    
29.      }
    

31.  }
    

`

![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)


文章知识点与官方知识档案匹配,可进一步学习相关知识

Java技能树首页概览137397 人正在系统学习中

$(function() { setTimeout(function () { var mathcodeList = document.querySelectorAll('.htmledit_views img.mathcode'); if (mathcodeList.length > 0) { for (let i = 0; i < mathcodeList.length; i++) { if (mathcodeList[i].naturalWidth === 0 || mathcodeList[i].naturalHeight === 0) { var alt = mathcodeList[i].alt; alt = '\\(' + alt + '\\)'; var curSpan = $(''); curSpan.text(alt); $(mathcodeList[i]).before(curSpan); $(mathcodeList[i]).remove(); } } MathJax.Hub.Queue(["Typeset",MathJax.Hub]); } }, 1000) });