zoukankan      html  css  js  c++  java
  • Spring Cloud Alibaba学习笔记(1)

      Spring Cloud Alibaba从孵化器版本毕业:https://github.com/alibaba/spring-cloud-alibaba,记录一下自己学习Spring Cloud Alibaba的笔记。

    1.在整合Spring Cloud Alibaba之前,首先需要整合Spring Cloud

      在Spring Cloud的官网可以了解到目前最新的稳定版Spring Cloud版本,我所选择版本是Greenwich.SR3。在项目的pom.xml文件中加入以下代码段就可以整合Spring Cloud了。

     <dependencyManagement>
            <dependencies>
                <!-- 整合spring-cloud-->
                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-dependencies</artifactId>
                    <version>Greenwich.SR3</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>

    2.接下来整合Spring CLoud Alibaba

    整合Spring CLoud Alibaba需要注意与Spring Cloud之间的版本对应,以下是官网给出的版本对应关系。

    Spring Cloud VersionSpring Cloud Alibaba VersionSpring Boot Version

    Spring Cloud Greenwich

    2.1.0.RELEASE

    2.1.X.RELEASE

    Spring Cloud Finchley

    2.0.0.RELEASE

    2.0.X.RELEASE

    Spring Cloud Edgware

    1.5.0.RELEASE

    1.5.X.RELEASE

    对于我所使用的 Spring Cloud Greenwich.SR3版本,只需要在 dependencyManagement 中添加如下内容:

    <!-- 整合spring-cloud-alibaba-->
    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-alibaba-dependencies</artifactId>
        <version>2.1.0.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>

    如果你使用 Spring Cloud Finchley 版本,请在 dependencyManagement 中添加如下内容:

    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-alibaba-dependencies</artifactId>
        <version>2.0.0.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>

    如果你使用 Spring Cloud Edgware 版本,请在 dependencyManagement 中添加如下内容:

    <dependency>
        <groupId>com.alibaba.cloud</groupId>
        <artifactId>spring-cloud-alibaba-dependencies</artifactId>
        <version>1.5.0.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>

    整合完毕。

  • 相关阅读:
    将C#文档注释生成.chm帮助文档
    Gacutil.exe(全局程序集缓存工具)
    虚拟分区安装
    ListView控件绑定DataSet
    DataSet之增删改查操作(DataGridView绑定)
    Win8系统如何关闭用户账户控制UAC
    win8系统 重装系统如何删除EFI分区
    win8系统 如何默认显示文件扩展名和显示隐藏文件
    win8系统 如何不显示这台电脑的文件夹
    Win7 本地打印后台处理程序服务没有运 怎么办
  • 原文地址:https://www.cnblogs.com/fx-blog/p/11684105.html
Copyright © 2011-2022 走看看