1.首先基于springboot项目依赖:
根项目依赖所有spring需要的包
<!-- springboot 决解冲突 -->
<spring.boot>2.0.0.RELEASE</spring.boot>
<cloud.version>Finchley.BUILD-SNAPSHOT</cloud.version>(这个版本号不与springboot冲突)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
2.子项目可根据需求加载所需的springcloud模块