在 SpringCloud 之中使用了大量的Netflix 的开源项目,而其中 Eureka 就属于Netflix 提供的发现服务组件,所有的微服务在使用之中全部向 Eureka 之中进行注册,而后客户端直接利用 Eureka 进行服务信息的获取。
Eureka服务端配置:
1、在pom.xml追加相应的依赖支持库,这里新建的是一个maven新项目
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId> org.mybatis.spring.boot</groupId>
&nb