【Spring Cloud Alibaba微服务从入门到进阶】第4章 Spring Cloud Alibaba介绍

4-1 Spring Cloud Alibaba是什么

Spring Cloud Alibaba是什么?

  • Spring Cloud 的子项目;
  • 致力于提供微服务开发的一站式解决方案;
    • 包含微服务开发的必备组件;
    • 基于Spring Cloud,符合Spring Cloud标准;
    • 阿里的微服务解决方案;

Spring Cloud:快速构建分布式系统的工具集;

 

4-2 版本与兼容性

  1. Spring Cloud版本命名
    1. Spring Boot语义化版本命名
      <!--语义化的版本控制-->
      <!--2:主版本,第几代-->
      <!--1:次版本,一些功能的增加,但是架构没有太大的变化,是兼容的-->
      <!--5:增量版本,bug修复-->
      <!--release:里程碑,SNAPSHOT:开发版 M:里程碑 RELEASE:正式版-->
    2. Spring Cloud(常用了英国伦敦地铁站的名称来命名)首字母越靠后表示版本号越大,参考https://spring.io/projects/spring-cloud
  2. Spring Cloud生命周期
    1. 版本发布规划,参考https://github.com/spring-cloud/spring-cloud-release/milestones
    2. 版本发布记录,参考https://github.com/spring-cloud/spring-cloud-release/releases
    3. 版本终止声明,参考https://spring.io/projects/spring-cloud#overview,搜索【end-of-life】关键字
  3. Spring Boot、Spring Cloud、Spring Cloud Alibaba的兼容性关系
    1. Spring Cloud Release TrainSpring Cloud AlibabaBoot Version

      Hoxton

       

      2.2.x

      Greenwich

      0.9.0.RELEASE

      2.1.x

      Finchley

      0.2.X.RELEASE

      2.0.x

      Edgware

      0.1.X.RELEASE

      1.5.x

      Dalston

       

      1.5.x

  4. 生产环境怎么选择版本?
    1. 坚决不用非稳定版本/end-of-life版本
    2. 尽量使用最新一代
      1. xxx.RELEASE版本缓一缓
      2. SR2之后一般可以放心使用

4-3 为项目整合Spring Cloud Alibaba

  1. 先整合Spring Cloud
  2. 再整合Spring Cloud Alibaba
<dependencyManagement>
        <dependencies>
            <!--整合spring cloud-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Greenwich.SR1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--整合spring cloud alibaba-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>0.9.0.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

 


版权声明:本文为linchaoquande原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。