Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

SpringCloudAlibaba环境搭建

搭建环境

SpringCloud Hoxton.SR6

SpringCloud 2.2.1RELEASE

SpringBoot 2.2.5RELEASE

1、首先创建一个空的项目

2、添加一个maven项目作为父项目

3、添加依赖和版本管理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?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>com.bestrookie</groupId>
<artifactId>springcloudalibaba_parent</artifactId>
<version>1.0-SNAPSHOT</version>

<!-- 继承springboot父项目-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
</parent>
<!-- 版本管理-->
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR6</spring-cloud.version>
<spring.cloud.alibab.version>2.2.1.RELEASE</spring.cloud.alibab.version>
</properties>
<!--维护依赖-->
<dependencyManagement>
<dependencies>
<!-- 维护springcloud-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 维护springcloud alibaba-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring.cloud.alibab.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>


</project>

评论