Skip to content

Commit 03c7084

Browse files
committed
Upgrade to ABP 9.0.2
1 parent 2afe038 commit 03c7084

File tree

114 files changed

+23350
-17681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+23350
-17681
lines changed

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: NuGet/setup-nuget@v1
1313
- uses: actions/setup-dotnet@v3
1414
with:
15-
dotnet-version: '8.0.x'
15+
dotnet-version: '9.0.x'
1616

1717
- name: read common.props
1818
id: commonProps

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33

4-
<AbpVersion>8.3.2</AbpVersion>
4+
<AbpVersion>9.0.2</AbpVersion>
55

66
</PropertyGroup>
77
</Project>

common.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<LangVersion>latest</LangVersion>
4-
<Version>0.16.0</Version>
4+
<Version>0.17.0</Version>
55
<NoWarn>$(NoWarn);CS1591</NoWarn>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<Authors>EasyAbp Team</Authors>

driver/EasyAbp.CacheManagement.StackExchangeRedis/EasyAbp.CacheManagement.StackExchangeRedis.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="..\..\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>net8.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
<RootNamespace />
88
</PropertyGroup>
99

host/EasyAbp.CacheManagement.Host.Shared/EasyAbp.CacheManagement.Host.Shared.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="..\..\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>net8.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
<RootNamespace>EasyAbp.CacheManagement</RootNamespace>
88
</PropertyGroup>
99

host/EasyAbp.CacheManagement.HttpApi.Host/CacheManagementHttpApiHostModule.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
148148
}
149149
app.UseHttpsRedirection();
150150
app.UseCorrelationId();
151-
app.UseStaticFiles();
151+
app.MapAbpStaticAssets();
152152
app.UseRouting();
153153
app.UseCors(DefaultCorsPolicyName);
154154
app.UseAuthentication();

host/EasyAbp.CacheManagement.HttpApi.Host/EasyAbp.CacheManagement.HttpApi.Host.csproj

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
<Import Project="..\..\common.props" />
44

55
<PropertyGroup>
6-
<TargetFramework>net8.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77
<RootNamespace>EasyAbp.CacheManagement</RootNamespace>
88
<PreserveCompilationReferences>true</PreserveCompilationReferences>
99
<UserSecretsId>EasyAbp.CacheManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010</UserSecretsId>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
14-
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
15-
<PackageReference Include="IdentityModel" Version="6.2.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
17-
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0" />
18-
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.4" />
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4" />
13+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
14+
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
15+
<PackageReference Include="Serilog.Sinks.Async" Version="2.0.0" />
16+
<PackageReference Include="IdentityModel" Version="7.0.0" />
17+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.0" />
18+
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0" />
19+
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.0" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
2021
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
2122
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="$(AbpVersion)" />
2223
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="$(AbpVersion)" />
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
using System;
2-
using System.IO;
3-
using Microsoft.AspNetCore.Hosting;
2+
using System.Threading.Tasks;
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.Extensions.DependencyInjection;
45
using Microsoft.Extensions.Hosting;
56
using Serilog;
67
using Serilog.Events;
78

8-
namespace EasyAbp.CacheManagement
9+
namespace EasyAbp.CacheManagement;
10+
11+
public class Program
912
{
10-
public class Program
13+
public async static Task<int> Main(string[] args)
1114
{
12-
public static int Main(string[] args)
13-
{
14-
Log.Logger = new LoggerConfiguration()
15+
Log.Logger = new LoggerConfiguration()
1516
#if DEBUG
16-
.MinimumLevel.Debug()
17+
.MinimumLevel.Debug()
1718
#else
18-
.MinimumLevel.Information()
19+
.MinimumLevel.Information()
1920
#endif
20-
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
21-
.Enrich.FromLogContext()
22-
.WriteTo.File("Logs/logs.txt")
23-
.CreateLogger();
21+
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22+
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23+
.Enrich.FromLogContext()
24+
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25+
.WriteTo.Async(c => c.Console())
26+
.CreateLogger();
2427

25-
try
26-
{
27-
Log.Information("Starting web host.");
28-
CreateHostBuilder(args).Build().Run();
29-
return 0;
30-
}
31-
catch (Exception ex)
32-
{
33-
Log.Fatal(ex, "Host terminated unexpectedly!");
34-
return 1;
35-
}
36-
finally
28+
try
29+
{
30+
Log.Information("Starting web host.");
31+
var builder = WebApplication.CreateBuilder(args);
32+
builder.Host.AddAppSettingsSecretsJson()
33+
.UseAutofac()
34+
.UseSerilog();
35+
await builder.AddApplicationAsync<CacheManagementHttpApiHostModule>();
36+
var app = builder.Build();
37+
await app.InitializeApplicationAsync();
38+
await app.RunAsync();
39+
return 0;
40+
}
41+
catch (Exception ex)
42+
{
43+
if (ex is HostAbortedException)
3744
{
38-
Log.CloseAndFlush();
45+
throw;
3946
}
40-
}
4147

42-
internal static IHostBuilder CreateHostBuilder(string[] args) =>
43-
Host.CreateDefaultBuilder(args)
44-
.ConfigureWebHostDefaults(webBuilder =>
45-
{
46-
webBuilder.UseStartup<Startup>();
47-
})
48-
.UseAutofac()
49-
.UseSerilog();
48+
Log.Fatal(ex, "Host terminated unexpectedly!");
49+
return 1;
50+
}
51+
finally
52+
{
53+
Log.CloseAndFlush();
54+
}
5055
}
51-
}
56+
}

host/EasyAbp.CacheManagement.HttpApi.Host/Startup.cs

-21
This file was deleted.

host/EasyAbp.CacheManagement.IdentityServer/CacheManagementIdentityServerModule.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
179179
}
180180
app.UseHttpsRedirection();
181181
app.UseCorrelationId();
182-
app.UseStaticFiles();
182+
app.MapAbpStaticAssets();
183183
app.UseRouting();
184184
app.UseCors(DefaultCorsPolicyName);
185185
app.UseAuthentication();

host/EasyAbp.CacheManagement.IdentityServer/EasyAbp.CacheManagement.IdentityServer.csproj

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<RootNamespace>EasyAbp.CacheManagement</RootNamespace>
66
<PreserveCompilationReferences>true</PreserveCompilationReferences>
77
<UserSecretsId>EasyAbp.CacheManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010</UserSecretsId>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
12-
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
13-
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.4" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4" />
11+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
12+
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
13+
<PackageReference Include="Serilog.Sinks.Async" Version="2.0.0" />
14+
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0" />
15+
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.0" />
16+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
1617
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" />
1718
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="$(AbpVersion)" />
1819
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="$(AbpVersion)" />

0 commit comments

Comments
 (0)