博客园不常在线

有问题联系微信

微信号

微信公众号

Asp .Net Core 系列:Ocelot结合Consul实现服务注册、服务发现

Consul下载地址:https://www.consul.io/downloads.html

文档:https://learn.hashicorp.com/consul/getting-started/services

Ocelot文档:https://ocelot.readthedocs.io/en/latest/introduction/gettingstarted.html

运行Consul程序

执行命令:consul agent -dev

 

 Consul会暴露出一个Web端口

地址:127.0.0.1:8500

 

 新建我们的服务: 

执行命令 dotnet new webapi -n MSS.Service

 

posted @ 2024-01-09 23:19  Code技术分享  阅读(49)  评论(0编辑  收藏  举报