Consul 入门实战(3)-
Cousul 可以作为注册中和配置中心来使用,本来主要介绍 Spring Cloud 整合 Consul 的使用,文中所使用到的软件版本:Java 1.8.0_191、Consul 1.11.1、Spring Boot 2.3.12.RELEASE、Spring Cloud Hoxton.SR12。
1、Consul 作为注册中心
1.1、引入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>


