升级Ocelot 18.0.0 & 支持.net6

pull/14/head
liguoliang 3 years ago
parent ab147e9ed1
commit 75730ec6ff

@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<AssemblyName>ApiGatewayDemo</AssemblyName> <AssemblyName>ApiGatewayDemo</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Ocelot" Version="17.0.0" /> <PackageReference Include="Ocelot" Version="18.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

@ -3,7 +3,7 @@
"ApiGatewayDemo": { "ApiGatewayDemo": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://localhost:5001", "applicationUrl": "http://0.0.0.0:5001",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

@ -18,7 +18,7 @@
"ProductApi": { "ProductApi": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "http://*:5002", "applicationUrl": "http://0.0.0.0:5002",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

@ -21,7 +21,9 @@ namespace Ocelot.Provider.Nacos.NacosClient.V2
public static IServiceCollection AddNacosAspNet(this IServiceCollection services, IConfiguration configuration, string section = "nacos") public static IServiceCollection AddNacosAspNet(this IServiceCollection services, IConfiguration configuration, string section = "nacos")
{ {
services.Configure<NacosAspNetOptions>(configuration.GetSection(section)); services.Configure<NacosAspNetOptions>(configuration.GetSection(section));
services.AddNacosV2Naming(configuration);
services.AddNacosV2Naming(configuration, sectionName: section);
services.AddSingleton<RegSvcBgTask>(); services.AddSingleton<RegSvcBgTask>();
return services; return services;

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Authors>softlgl</Authors> <Authors>softlgl</Authors>
<Copyright>softlgl</Copyright> <Copyright>softlgl</Copyright>
<Owners>softlgl</Owners> <Owners>softlgl</Owners>
@ -12,10 +12,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="nacos-sdk-csharp" Version="1.2.2" /> <PackageReference Include="nacos-sdk-csharp" Version="1.3.1" />
<PackageReference Include="Ocelot" Version="17.0.0" /> <PackageReference Include="Ocelot" Version="18.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="EasyCaching.InMemory" Version="1.4.1" /> <PackageReference Include="EasyCaching.InMemory" Version="1.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

Loading…
Cancel
Save