zoukankan      html  css  js  c++  java
  • SpringCloud如何选择兼容的SpringBoot版本?

      SpringCloud的相关概念这里就不再叭叭了~~我们都知道SpringCloud只是一种架构风格,实际上其具体功能部分的实现还是基于SpringBoot。下面分别看一下SpringCloud和SpringBoot的版本:

    1.SpringCloud版本介绍

    SpringCloud官网版本

      下面是SpringCloud官网的版本介绍,目前最新版本是Hoxton SR3,我们可以看到SpringCloud还有Greenwich SR5 GA等版本,那SpringCloud的版本是如何定义的?各个版本到底是什么意思?

    1.1 SpringCloud版本号由来?

      SpringCloud的版本号是根据英国伦敦地铁站的名字进行命名的,由地铁站名称字母A-Z依次类推表示发布迭代版本。
      SpringCloud发布的第一个版本名称就是Angel,第二个是Brixton……因为SpringCloud下面包含了很多个小的子项目,为了避免SpringCloud的版本与子项目的版本冲突,所以SpringCloud没有使用我们常见的数字式的版本号,当SpringCloud的版本跌倒到达一定的程度的时候就会发布一个service release版本,一般简写为SRX,比如现在的SR3表示的就是Hoxton的第三个service release版本。
    在这里插入图片描述

    1.2 SpringCloud小版本

    版本号 介绍
    SR Service Release,表示正式版本,SR1表示第一个正式版本
    GA Generally Available, 表示稳定版本
    SNAPSHOT 快照版本,可能会随时更改
    M MileStone,M1表示第一个里程碑版本,一般同时会标注为PRE,表示预览版本

    2.SpringBoot版本介绍

      SpringBoot的版本号没有太多要说的,用的就是我们常见的数字式的版本号,现在常用的SpringBoot是2.0以上的版本。

    3.SpringCloud和SpringBoot版本适配问题

      文章开头讲到SpringCloud这种微服务架构风格其功能服务还是由SpringBoot来具体实现,为了尽量避免在开发过程中踩版本号相关的坑,我们必须要对两种技术栈进行版本号适配:

      假如我们现在使用的SpringCloud的最新版本Hoxton SR3,那么具体选用的SpringBoot版本可以通过下面操作来查看:
    首先进入官网地址
    在这里插入图片描述
    然后点击Reference Document
    在这里插入图片描述

      在SpringCloud官网地址中,将页面拉到靠下的位置,介绍了SpringCloud和SpringBoot之间的版本号适配问题。假如我们的SpringCloud使用的是Hoxton版本,那么SpringBoot就必须要使用2.2.x版本。
    在这里插入图片描述
      查看SpringCloud与SpringBoot的版本号匹配问题也可以通过地址来查看:
    在这里插入图片描述
    此地址访问之后返回的是一串没有格式化的json字符串,通过json格式化工具格式化之后也可以看出SpringBoot的哪个版本号与当前的SpringCloud相适配:

    {
        "git": {
            "commit": {
                "time": "2020-03-19T13:43:47Z",
                "id": "6a8d5ce"
            },
            "branch": "6a8d5ce9a63e30db3fa1c23c64a6b7cef2072c71"
        },
        "build": {
            "version": "0.0.1-SNAPSHOT",
            "artifact": "start-site",
            "name": "start.spring.io website",
            "versions": {
                "initializr": "0.9.0.BUILD-SNAPSHOT",
                "spring-boot": "2.2.5.RELEASE"
            },
            "group": "io.spring.start",
            "time": "2020-03-19T13:45:29.062Z"
        },
        "bom-ranges": {
            "azure": {
                "2.0.10": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
                "2.1.7": "Spring Boot >=2.1.0.RELEASE and <2.2.0.M1",
                "2.2.0": "Spring Boot >=2.2.0.M1"
            },
            "codecentric-spring-boot-admin": {
                "2.0.6": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
                "2.1.6": "Spring Boot >=2.1.0.M1 and <2.2.0.M1",
                "2.2.1": "Spring Boot >=2.2.0.M1"
            },
            "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.SR5": "Spring Boot >=2.1.0.RELEASE and <2.1.14.BUILD-SNAPSHOT",
                "Greenwich.BUILD-SNAPSHOT": "Spring Boot >=2.1.14.BUILD-SNAPSHOT and <2.2.0.M4",
                /**
    				Honton.SR3是我们目前SpringCloud的最新版本:SpringBoot的2.2.0及以上
    				到2.3.0以下的版本号可以相适配
    			*/
                "Hoxton.SR3": "Spring Boot >=2.2.0.M4 and <2.3.0.BUILD-SNAPSHOT",
                "Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.0.BUILD-SNAPSHOT"
            },
            "spring-cloud-alibaba": {
                "2.2.0.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
            },
            "spring-cloud-services": {
                "2.0.3.RELEASE": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
                "2.1.7.RELEASE": "Spring Boot >=2.1.0.RELEASE and <2.2.0.RELEASE",
                "2.2.3.RELEASE": "Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
            },
            "spring-statemachine": {
                "2.0.0.M4": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
                "2.0.0.M5": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
                "2.0.1.RELEASE": "Spring Boot >=2.0.0.RELEASE"
            },
            "vaadin": {
                "10.0.17": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
                "14.1.20": "Spring Boot >=2.1.0.M1"
            }
        },
        "dependency-ranges": {
            "okta": {
                "1.2.1": "Spring Boot >=2.1.2.RELEASE and <2.2.0.M1",
                "1.4.0": "Spring Boot >=2.2.0.M1"
            },
            "mybatis": {
                "2.0.1": "Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
                "2.1.2": "Spring Boot >=2.1.0.RELEASE"
            },
            "geode": {
                "1.2.5.RELEASE": "Spring Boot >=2.2.0.M5 and <2.3.0.M1",
                "1.3.0.M2": "Spring Boot >=2.3.0.M1 and <2.3.0.BUILD-SNAPSHOT",
                "1.3.0.BUILD-SNAPSHOT": "Spring Boot >=2.3.0.BUILD-SNAPSHOT"
            },
            "camel": {
                "2.22.4": "Spring Boot >=2.0.0.M1 and <2.1.0.M1",
                "2.24.3": "Spring Boot >=2.1.0.M1 and <2.2.0.M1",
                "3.1.0": "Spring Boot >=2.2.0.M1"
            },
            "solace": {
                "3.1.0": "Spring Boot >=2.1.0.RELEASE and <2.2.0.M1",
                "3.2.0": "Spring Boot >=2.2.0.M1"
            }
        }
    }
    
  • 相关阅读:
    20182324 2019-2020-1 《数据结构与面向对象程序设计》实验6报告
    20182324 2019-2020-1 《数据结构与面向对象程序设计》实验5报告
    20182324 2019-2020-1 《数据结构与面向对象程序设计》第6周学习总结
    Git fetch和git pull的区别
    第6章 线索二叉树
    第三章 线性表---链式存储结构(静态链表)
    第6章 树---二叉树
    第6章 树
    第4章 栈与队列-----栈
    第4章 栈与队列-----队列
  • 原文地址:https://www.cnblogs.com/wgty/p/12810400.html
Copyright © 2011-2022 走看看