项目中使用Spring Cloud + Consul,Spring Cloud的版本为Edgware.SR4,对应的Spring Boot版本为1.5.16.RELEASE,Consul版本为1.3.0。
项目中使用了spring-boot-actuator,因为1.x版本中开放运维端口过多,如/actuator,需要禁用这些端口,只开放健康检查相关的接口,因此添加了如下配置:
endpoints.enabled = false
endpoints.health.enabled = true
endpoints.info.enabled = true
添加后导致服务从consul被剔除,谁能帮忙解答下原因?