美文网首页
Spring Cloud Ribbon + Consul 服务发

Spring Cloud Ribbon + Consul 服务发

作者: FlySheep_ly | 来源:发表于2018-04-10 18:19 被阅读815次

Ribbon 进行客户端负载均衡时,如果被调用方起了多个实例,对于本地调试很麻烦。解决方法:在 bootstrap.properties 文件中加入以下配置:

spring.cloud.consul.ribbon.enabled=false
# 示例:hello-world.ribbon.listOfServers=192.168.26.183:8777
{替换成需要调用的服务名}.ribbon.listOfServers={替换成需要调用服务的IP:端口号}

相关文章

网友评论

      本文标题:Spring Cloud Ribbon + Consul 服务发

      本文链接:https://www.haomeiwen.com/subject/mgbnhftx.html