区域 依赖注入
continuous-integration/drone/push Build is passing Details

Uat_Study^2
hang 2024-05-30 15:57:53 +08:00
parent 4b7fff9869
commit 343f9211e2
3 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,8 @@ using Microsoft.AspNetCore.HttpOverrides;
using IRaCIS.Application.Services.BackGroundJob;
using LogDashboard;
using OfficeOpenXml.Utils;
using IP2Region.Net.Abstractions;
using IP2Region.Net.XDB;
@ -179,6 +181,7 @@ builder.Services.AddSingleton<IUserIdProvider, IRaCISUserIdProvider>();
//services.AddAuthorizationPolicySetup(_configuration);
#endregion
builder.Services.AddSingleton<ISearcher>(new Searcher(CachePolicy.Content, Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources, "ip2region.xdb")));
#endregion
var app = builder.Build();

View File

@ -108,4 +108,10 @@
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Resources\ip2region.xdb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

Binary file not shown.