diff --git a/demo/ApiGatewayDemo/ApiGatewayDemo.csproj b/demo/ApiGatewayDemo/ApiGatewayDemo.csproj index 4e94517..7534418 100644 --- a/demo/ApiGatewayDemo/ApiGatewayDemo.csproj +++ b/demo/ApiGatewayDemo/ApiGatewayDemo.csproj @@ -1,12 +1,12 @@ - + - net5.0 + net6.0 ApiGatewayDemo - + diff --git a/demo/ApiGatewayDemo/Properties/launchSettings.json b/demo/ApiGatewayDemo/Properties/launchSettings.json index c096f62..c9098c2 100644 --- a/demo/ApiGatewayDemo/Properties/launchSettings.json +++ b/demo/ApiGatewayDemo/Properties/launchSettings.json @@ -3,7 +3,7 @@ "ApiGatewayDemo": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://localhost:5001", + "applicationUrl": "http://0.0.0.0:5001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/demo/ProductApi/ProductApi.csproj b/demo/ProductApi/ProductApi.csproj index 301b5a2..717577b 100644 --- a/demo/ProductApi/ProductApi.csproj +++ b/demo/ProductApi/ProductApi.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/demo/ProductApi/Properties/launchSettings.json b/demo/ProductApi/Properties/launchSettings.json index 4042ab6..701f18a 100644 --- a/demo/ProductApi/Properties/launchSettings.json +++ b/demo/ProductApi/Properties/launchSettings.json @@ -18,7 +18,7 @@ "ProductApi": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://*:5002", + "applicationUrl": "http://0.0.0.0:5002", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Ocelot.Provider.Nacos/NacosClient/V2/ServiceCollectionExtensions.cs b/src/Ocelot.Provider.Nacos/NacosClient/V2/ServiceCollectionExtensions.cs index 53af0ed..8051c9d 100644 --- a/src/Ocelot.Provider.Nacos/NacosClient/V2/ServiceCollectionExtensions.cs +++ b/src/Ocelot.Provider.Nacos/NacosClient/V2/ServiceCollectionExtensions.cs @@ -21,7 +21,9 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2 public static IServiceCollection AddNacosAspNet(this IServiceCollection services, IConfiguration configuration, string section = "nacos") { services.Configure(configuration.GetSection(section)); - services.AddNacosV2Naming(configuration); + + services.AddNacosV2Naming(configuration, sectionName: section); + services.AddSingleton(); return services; diff --git a/src/Ocelot.Provider.Nacos/Ocelot.Provider.Nacos.csproj b/src/Ocelot.Provider.Nacos/Ocelot.Provider.Nacos.csproj index 19dd224..fdf6dec 100644 --- a/src/Ocelot.Provider.Nacos/Ocelot.Provider.Nacos.csproj +++ b/src/Ocelot.Provider.Nacos/Ocelot.Provider.Nacos.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 softlgl softlgl softlgl @@ -12,10 +12,10 @@ - - + + - + diff --git a/test/Ocelot.Provider.Nacos.Test/Ocelot.Provider.Nacos.Test.csproj b/test/Ocelot.Provider.Nacos.Test/Ocelot.Provider.Nacos.Test.csproj index 3384b5d..8cf1083 100644 --- a/test/Ocelot.Provider.Nacos.Test/Ocelot.Provider.Nacos.Test.csproj +++ b/test/Ocelot.Provider.Nacos.Test/Ocelot.Provider.Nacos.Test.csproj @@ -1,7 +1,7 @@ - + - net5.0 + net6.0 false