【零开始搭建SpringCloud Alibaba】搭建SpringCloudAlibaba统一父依赖
搭建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文件配置以下标签属性即可
<?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>
相关文章
- 一文让你轻松认识SpringCloud的负载均衡(Ribbon)
- idea社区版没有web application_springcloud文档
- SpringCloud常见面试题及答案
- SpringCloud微服务架构实战使用分布式文件系统DFS
- SpringCloud微服务架构实战:商家权限体系设计及开发
- SpringCloud实战:从公共模块搭建一套完整微服务架构
- springcloud实战:服务间通信OpenFeign熔断
- springcloud eureka原理和机制_eureka配置详解
- 【零开始搭建SpringCloud Alibaba】搭建配置中心及注册中心nacos(Server端)
- SpringCloud(七) - 微信支付
- SpringCloud之Config
- SpringCloud 微服务工具集总结
- 【Dubbo】高级特效以及SpringCloud整合Dubbo