注册中心是每个程序必不可少的,注册中心可以缓解后台的压力
一 配置注册中心
1.创建本地maven 文件 在pom中配置需要的架包
<!-- 依赖springboot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.SR4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- 配置注册中心 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId