Spring Cloud Alibaba study notes (1) - Project Integration Spring Cloud Alibaba

  Spring Cloud Alibaba graduated from the incubator version: https://github.com/alibaba/spring-cloud-alibaba , record notes about their own learning Spring Cloud Alibaba's.

1. Before the integration of Spring CLoud Alibaba, first of all need to integrate Spring Cloud

  In Spring Cloud's official website can learn the latest stable version of Spring Cloud version, I selected version is Greenwich.SR3. Add the following code snippet in the pom.xml file for the project will be the integration of 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. Next to integrate Spring CLoud Alibaba

Note that the integration of Spring CLoud Alibaba correspondence between the version of Cloud Spring, the following is the official website of the version given by correspondence.

Spring Cloud Version Spring Cloud Alibaba Version Spring 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

 

 

 

 

 

 

 

For Cloud Greenwich.SR3 Spring version I use, only you need to add the following to the dependencyManagement in:

<!-- 整合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>

If you use Spring Cloud Finchley version, please add the following in dependencyManagement in:

<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>

If you use Spring Cloud Edgware version, please add the following in dependencyManagement in:

<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>

Integration is complete.

Guess you like

Origin www.cnblogs.com/fx-blog/p/11684105.html