From 8b3339c81d35bdb4d4649907a19d3df4f6ae2897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Sat, 6 Nov 2021 13:26:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AEconsul?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json | 6 +++--- .../MiddlewareExtend/ConsulRegiterExtend.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json b/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json index af47026f..d27f3c97 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json @@ -58,13 +58,13 @@ "TopicName": "kafkalog" }, "ConsulClientOption": { - "IP": "192.168.2.128", + "IP": "118.195.191.41", "Port": "8500", "Datacenter": "dc1" }, "ConsulRegisterOption": { - "IP": "192.168.1.104", - "Port": "7001", + "IP": "183.216.18.15", + "Port": "44329", "GroupName": "ApiMicroservice", "HealthCheckUrl": "/Health", "Interval": 10, diff --git a/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/ConsulRegiterExtend.cs b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/ConsulRegiterExtend.cs index 25b2c3e2..7c8ab310 100644 --- a/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/ConsulRegiterExtend.cs +++ b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/ConsulRegiterExtend.cs @@ -30,7 +30,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend { var consulRegisterOption = Appsettings.app("ConsulRegisterOption"); - var consulClientOption = Appsettings.app("ConsulRegisterOption"); + var consulClientOption = Appsettings.app("ConsulClientOption"); using (ConsulClient client = new ConsulClient(c => { c.Address = new Uri($"http://{consulClientOption.IP}:{consulClientOption.Port}/");