搭建一个Spring Cloud项目
1.New Project
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5241acb204e74d048fc4cb7802f30f3b.png)
2.聚合总父工程名字
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/8763a7dcf462ec6fc1801712fd30a6ba.png)
3.Maven选版本
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/1a02aec6b5c224d1f8099506d249fc94.png)
4.工程名字
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/cad55674d305f66a65ec8d61c5d6f3a4.png)
5.字符编码
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5455ab81d8773cdc169e53b115619af2.png)
6.注解生效激活
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/92106a15120aa1e41f56a3e0c4404865.png)
7.java编译版本选8
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/eb8e92b799c1ae5b6bf8270fd2c45164.png)
8.File Type过滤
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9939ed67df0654d7f62daf89cdbee097.png)
9.删除src文件夹
10.修改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>com.indi.springcloud</groupId>
<artifactId>cloud2020</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<junit.version>4.12</junit.version>
<log4j.version>1.2.17</log4j.version>
<lombok.version>1.16.18</lombok.version>
<mysql.version>5.1.47</mysql.version>
<druid.version>1.1.16</druid.version>
<mybatis.spring.boot.version>1.3.0</mybatis.spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<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>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.spring.boot.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
</project>