前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【零开始搭建SpringCloud Alibaba】搭建SpringCloudAlibaba统一父依赖

【零开始搭建SpringCloud Alibaba】搭建SpringCloudAlibaba统一父依赖

作者头像
RRT冻羊
发布2022-11-03 13:58:12
2540
发布2022-11-03 13:58:12
举报
文章被收录于专栏:冻羊技术思考冻羊技术思考

搭建SpringCloud Alibaba

搭建统一父pom

版本兼容

我们需要关注的紧紧是版本兼容问题

SpringCloud和SpringBoot的版本兼容https://spring.io/projects/spring-cloud

SpringCloudAlibaba和SpringBoot的版本兼容https://github.com/alibaba/spring-cloud-alibaba/blob/master/README-zh.md

SpringCloudAlibaba官方整理的版本说明

https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E

Spring Cloud Version

Spring Cloud Alibaba Version

Spring Boot Version

Spring Cloud Hoxton.SR8

2.2.3.RELEASE

2.3.2.RELEASE

Spring Cloud Greenwich.SR6

2.1.3.RELEASE

2.1.13.RELEASE

Spring Cloud Hoxton.SR8

2.2.2.RELEASE

2.3.2.RELEASE

Spring Cloud Hoxton.SR3

2.2.1.RELEASE

2.2.5.RELEASE

Spring Cloud Hoxton.RELEASE

2.2.0.RELEASE

2.2.X.RELEASE

Spring Cloud Greenwich

2.1.2.RELEASE

2.1.X.RELEASE

Spring Cloud Finchley

2.0.3.RELEASE

2.0.X.RELEASE

Spring Cloud Edgware

1.5.1.RELEASE(停止维护,建议升级)

1.5.X.RELEASE

快速上手

首先它是在传统搭建SpringCloud的基础上,再引入SpringCloudAlibaba即可。

新建一个maven标准项目,在pom.xml文件配置以下标签属性即可

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>dy.springcloudalibaba</groupId>
    <artifactId>dy-springcloud-alibaba-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <description>SpringCloud-Alibaba公共父依赖</description>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.3.RELEASE</version>
        <relativePath/>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
        <spring-cloud-alibaba-version>2.0.3.RELEASE</spring-cloud-alibaba-version>
    </properties>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>${spring-cloud-alibaba-version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-10-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 搭建SpringCloud Alibaba
    • 搭建统一父pom
      • 版本兼容
      • 快速上手
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档