# Zd.MicroService **Repository Path**: wwwKit/Zd.MicroService ## Basic Information - **Project Name**: Zd.MicroService - **Description**: 践行微服务架构 .NetCore3.1+Ocelot+Consul - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2021-06-21 - **Last Updated**: 2021-06-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Zd.MicroService #### 介绍 践行微服务架构,完成微服务落地,了解微服务体系概念。 建设过程可参考: [Zd.MicroService博客](https://www.cnblogs.com/clydo/p/14182376.html) #### 软件架构 1. 服务实例:**.NetCore3.1 -- Webapi** 2. 服务注册与发现: **Consul** 3. 网关:**Ocelot** #### 安装教程 1. clone后重新生成一遍避免运行不了 2. 在本地安装Consul [Consul](https://www.consul.io/downloads.html) 并使用命令运行: consul agent -dev 3. 控制台启动Zd.MicroService.WebApi.dll: dotnet Zd.MicroService.WebApi.dll --urls="http://*:21211" --ip="127.0.0.1" --port="21211" ***(多启动几个用于查看效果)*** 4. 控制台启动Zd.MicroService.OcelotGw.dll: Zd.MicroService.OcelotGw.dll --urls="http://*:1222" 5. 启动Zd.MicroService.Client 刷新页面可查看效果 #### 使用说明 特别留意的地方是ocelot.json配置文件