区域 依赖注入
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4b7fff9869
commit
343f9211e2
|
@ -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();
|
||||
|
|
|
@ -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.
Loading…
Reference in New Issue