Browse Source

🐛 fix: 修复项目引用

pull/1070/head
colin 2 years ago
parent
commit
45902b4fc3
  1. 48
      aspnet-core/LINGYUN.MicroService.SingleProject.sln
  2. 4
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs
  3. 2
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj
  4. 10
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs
  5. 12
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs
  6. 5
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs
  7. 5
      aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj
  8. 8
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
  9. 185
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
  10. 7
      aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs

48
aspnet-core/LINGYUN.MicroService.SingleProject.sln

@ -606,12 +606,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cap", "cap", "{7C35101B-EA2
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.EventBus.CAP", "framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj", "{4539FCDB-7192-442C-BD9B-0AC71E882F4F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.EventBus.CAP", "framework\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj", "{4539FCDB-7192-442C-BD9B-0AC71E882F4F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.AuditLogging.IP2Region", "framework\auditing\LINGYUN.Abp.AuditLogging.IP2Region\LINGYUN.Abp.AuditLogging.IP2Region.csproj", "{DFDF367D-EDE1-4365-90F9-32F529117B60}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer.csproj", "{30EEF879-CFF7-4661-89CB-9CB68328D008}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer\LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer.csproj", "{30EEF879-CFF7-4661-89CB-9CB68328D008}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.AIO.Applications.Single", "services\LY.AIO.Applications.Single\LY.AIO.Applications.Single.csproj", "{37740138-D088-46F5-83A8-8A8180FE65D8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.AIO.Applications.Single", "services\LY.AIO.Applications.Single\LY.AIO.Applications.Single.csproj", "{37740138-D088-46F5-83A8-8A8180FE65D8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.IP.Location", "framework\common\LINGYUN.Abp.IP.Location\LINGYUN.Abp.IP.Location.csproj", "{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.AuditLogging.IP.Location", "framework\auditing\LINGYUN.Abp.AuditLogging.IP.Location\LINGYUN.Abp.AuditLogging.IP.Location.csproj", "{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.MySql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj", "{746813A9-4221-42D8-AAB5-66CB69EC844F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1598,26 +1602,6 @@ Global
{4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.Build.0 = Release|Any CPU {4539FCDB-7192-442C-BD9B-0AC71E882F4F}.Release|Any CPU.Build.0 = Release|Any CPU
{DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFDF367D-EDE1-4365-90F9-32F529117B60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFDF367D-EDE1-4365-90F9-32F529117B60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFDF367D-EDE1-4365-90F9-32F529117B60}.Release|Any CPU.Build.0 = Release|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D0C8993-580A-4585-BE3B-87895C76FC89}.Release|Any CPU.Build.0 = Release|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA742577-63B0-4188-AA36-AC6E0ED99BB6}.Release|Any CPU.Build.0 = Release|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Release|Any CPU.Build.0 = Release|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.Build.0 = Release|Any CPU
{30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.Build.0 = Debug|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30EEF879-CFF7-4661-89CB-9CB68328D008}.Release|Any CPU.ActiveCfg = Release|Any CPU {30EEF879-CFF7-4661-89CB-9CB68328D008}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -1626,6 +1610,18 @@ Global
{37740138-D088-46F5-83A8-8A8180FE65D8}.Debug|Any CPU.Build.0 = Debug|Any CPU {37740138-D088-46F5-83A8-8A8180FE65D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.Build.0 = Release|Any CPU {37740138-D088-46F5-83A8-8A8180FE65D8}.Release|Any CPU.Build.0 = Release|Any CPU
{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C}.Release|Any CPU.Build.0 = Release|Any CPU
{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE}.Release|Any CPU.Build.0 = Release|Any CPU
{746813A9-4221-42D8-AAB5-66CB69EC844F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{746813A9-4221-42D8-AAB5-66CB69EC844F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{746813A9-4221-42D8-AAB5-66CB69EC844F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{746813A9-4221-42D8-AAB5-66CB69EC844F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1920,13 +1916,11 @@ Global
{BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7} {BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7}
{7C35101B-EA29-4B3D-B424-FAD625977E4D} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1} {7C35101B-EA29-4B3D-B424-FAD625977E4D} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{4539FCDB-7192-442C-BD9B-0AC71E882F4F} = {7C35101B-EA29-4B3D-B424-FAD625977E4D} {4539FCDB-7192-442C-BD9B-0AC71E882F4F} = {7C35101B-EA29-4B3D-B424-FAD625977E4D}
{DFDF367D-EDE1-4365-90F9-32F529117B60} = {C22741F9-FC56-4AE3-B543-9F15C779D345}
{8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{AA742577-63B0-4188-AA36-AC6E0ED99BB6} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{2B167D92-2327-4679-9096-49F274FABE0C} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{30EEF879-CFF7-4661-89CB-9CB68328D008} = {0D69B63D-F082-4D57-9FF0-355642C56993} {30EEF879-CFF7-4661-89CB-9CB68328D008} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{37740138-D088-46F5-83A8-8A8180FE65D8} = {B4247B78-34BC-4A3F-91A4-661F7DCD6E10} {37740138-D088-46F5-83A8-8A8180FE65D8} = {B4247B78-34BC-4A3F-91A4-661F7DCD6E10}
{5BE31786-EAAB-4C86-8FFF-C07F27FBFD1C} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{77B3C7A4-15C7-4EFF-8451-4F13B4CCA4AE} = {C22741F9-FC56-4AE3-B543-9F15C779D345}
{746813A9-4221-42D8-AAB5-66CB69EC844F} = {0D69B63D-F082-4D57-9FF0-355642C56993}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1} SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}

4
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer/SingleMigrationsEntityFrameworkCoreSqlServerModule.cs

@ -1,4 +1,4 @@
using LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer; // using LINGYUN.Abp.Elsa.EntityFrameworkCore.SqlServer;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
@ -9,7 +9,7 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer;
[DependsOn( [DependsOn(
typeof(AbpEntityFrameworkCoreSqlServerModule), typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpElsaEntityFrameworkCoreSqlServerModule), // typeof(AbpElsaEntityFrameworkCoreSqlServerModule),
typeof(SingleMigrationsEntityFrameworkCoreModule) typeof(SingleMigrationsEntityFrameworkCoreModule)
)] )]
public class SingleMigrationsEntityFrameworkCoreSqlServerModule : AbpModule public class SingleMigrationsEntityFrameworkCoreSqlServerModule : AbpModule

2
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN.Abp.Identity.Session.AspNetCore.csproj

@ -18,7 +18,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\framework\common\LINGYUN.Abp.IP2Region\LINGYUN.Abp.IP2Region.csproj" /> <ProjectReference Include="..\..\..\framework\common\LINGYUN.Abp.IP.Location\LINGYUN.Abp.IP.Location.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj" /> <ProjectReference Include="..\LINGYUN.Abp.Identity.Session\LINGYUN.Abp.Identity.Session.csproj" />
</ItemGroup> </ItemGroup>

10
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/AbpIdentitySessionAspNetCoreModule.cs

@ -1,18 +1,12 @@
using LINGYUN.Abp.IP2Region; using LINGYUN.Abp.IP.Location;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.AspNetCore; using Volo.Abp.AspNetCore;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Identity.Session.AspNetCore; namespace LINGYUN.Abp.Identity.Session.AspNetCore;
[DependsOn(typeof(AbpAspNetCoreModule))] [DependsOn(typeof(AbpAspNetCoreModule))]
[DependsOn(typeof(AbpIP2RegionModule))] [DependsOn(typeof(AbpIPLocationModule))]
[DependsOn(typeof(AbpIdentitySessionModule))] [DependsOn(typeof(AbpIdentitySessionModule))]
public class AbpIdentitySessionAspNetCoreModule : AbpModule public class AbpIdentitySessionAspNetCoreModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.Replace(ServiceDescriptor.Singleton<IIpLocationInfoProvider, IP2RegionLocationInfoProvider>());
}
} }

12
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Session.AspNetCore/LINGYUN/Abp/Identity/Session/AspNetCore/HttpContextDeviceInfoProvider.cs

@ -1,5 +1,5 @@
using DeviceDetectorNET; using DeviceDetectorNET;
using LINGYUN.Abp.IP2Region; using LINGYUN.Abp.IP.Location;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -9,16 +9,16 @@ using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Identity.Session.AspNetCore; namespace LINGYUN.Abp.Identity.Session.AspNetCore;
public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDependency public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDependency
{ {
protected IIpLocationInfoProvider IpLocationInfoProvider { get; } protected IIPLocationResolver IPLocationResolver { get; }
protected IWebClientInfoProvider WebClientInfoProvider { get; } protected IWebClientInfoProvider WebClientInfoProvider { get; }
protected AbpIdentitySessionAspNetCoreOptions Options { get; } protected AbpIdentitySessionAspNetCoreOptions Options { get; }
public HttpContextDeviceInfoProvider( public HttpContextDeviceInfoProvider(
IIpLocationInfoProvider ipLocationInfoProvider, IIPLocationResolver iPLocationResolver,
IWebClientInfoProvider webClientInfoProvider, IWebClientInfoProvider webClientInfoProvider,
IOptions<AbpIdentitySessionAspNetCoreOptions> options) IOptions<AbpIdentitySessionAspNetCoreOptions> options)
{ {
IpLocationInfoProvider = ipLocationInfoProvider; IPLocationResolver = iPLocationResolver;
WebClientInfoProvider = webClientInfoProvider; WebClientInfoProvider = webClientInfoProvider;
Options = options.Value; Options = options.Value;
} }
@ -51,8 +51,8 @@ public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDepe
protected async virtual Task<string> GetRegion(string ipAddress) protected async virtual Task<string> GetRegion(string ipAddress)
{ {
var locationInfo = await IpLocationInfoProvider.GetLocationInfoAsync(ipAddress); var locationInfo = await IPLocationResolver.ResolveAsync(ipAddress);
return locationInfo?.Remarks; return locationInfo.Location?.Remarks;
} }
private class BrowserDeviceInfo private class BrowserDeviceInfo

5
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/AbpOpenIddictAspNetCoreSessionModule.cs

@ -3,15 +3,14 @@ using LINGYUN.Abp.Identity.Session;
using LINGYUN.Abp.Identity.Session.AspNetCore; using LINGYUN.Abp.Identity.Session.AspNetCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using static OpenIddict.Abstractions.OpenIddictConstants; using static OpenIddict.Abstractions.OpenIddictConstants;
namespace LINGYUN.Abp.OpenIddict.AspNetCore.Session; namespace LINGYUN.Abp.OpenIddict.AspNetCore.Session;
[DependsOn( [DependsOn(
typeof(AbpIdentitySessionAspNetCoreModule),
typeof(AbpIdentityDomainModule), typeof(AbpIdentityDomainModule),
typeof(AbpOpenIddictAspNetCoreModule))] typeof(AbpIdentitySessionAspNetCoreModule)
)]
public class AbpOpenIddictAspNetCoreSessionModule : AbpModule public class AbpOpenIddictAspNetCoreSessionModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)

5
aspnet-core/services/LY.MicroService.Applications.Single/LY.MicroService.Applications.Single.csproj

@ -64,7 +64,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.IP2Region\LINGYUN.Abp.AuditLogging.IP2Region.csproj" /> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.IP.Location\LINGYUN.Abp.AuditLogging.IP.Location.csproj" />
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging\LINGYUN.Abp.AuditLogging.csproj" /> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging\LINGYUN.Abp.AuditLogging.csproj" />
<ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.QQ\LINGYUN.Abp.Authentication.QQ.csproj" /> <ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.QQ\LINGYUN.Abp.Authentication.QQ.csproj" />
<ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.WeChat\LINGYUN.Abp.Authentication.WeChat.csproj" /> <ProjectReference Include="..\..\framework\authentication\LINGYUN.Abp.Authentication.WeChat\LINGYUN.Abp.Authentication.WeChat.csproj" />
@ -84,6 +84,7 @@
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation\LINGYUN.Abp.Features.LimitValidation.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Features.LimitValidation\LINGYUN.Abp.Features.LimitValidation.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Http.Client.Wrapper\LINGYUN.Abp.Http.Client.Wrapper.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Http.Client.Wrapper\LINGYUN.Abp.Http.Client.Wrapper.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.IdGenerator\LINGYUN.Abp.IdGenerator.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.IdGenerator\LINGYUN.Abp.IdGenerator.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.IP2Region\LINGYUN.Abp.IP2Region.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.RealTime\LINGYUN.Abp.RealTime.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.RealTime\LINGYUN.Abp.RealTime.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Wrapper\LINGYUN.Abp.Wrapper.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Wrapper\LINGYUN.Abp.Wrapper.csproj" />
<ProjectReference Include="..\..\framework\dynamic-queryable\LINGYUN.Abp.Dynamic.Queryable.Application.Contracts\LINGYUN.Abp.Dynamic.Queryable.Application.Contracts.csproj" /> <ProjectReference Include="..\..\framework\dynamic-queryable\LINGYUN.Abp.Dynamic.Queryable.Application.Contracts\LINGYUN.Abp.Dynamic.Queryable.Application.Contracts.csproj" />
@ -119,10 +120,10 @@
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat.Work.HttpApi\LINGYUN.Abp.WeChat.Work.HttpApi.csproj" /> <ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat.Work.HttpApi\LINGYUN.Abp.WeChat.Work.HttpApi.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat.Work\LINGYUN.Abp.WeChat.Work.csproj" /> <ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat.Work\LINGYUN.Abp.WeChat.Work.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" /> <ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
<ProjectReference Include="..\..\migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\migrations\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application.Contracts\LINGYUN.Abp.Account.Application.Contracts.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.Application\LINGYUN.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj" /> <ProjectReference Include="..\..\modules\account\LINGYUN.Abp.Account.HttpApi\LINGYUN.Abp.Account.HttpApi.csproj" />

8
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs

@ -1,5 +1,6 @@
using DotNetCore.CAP; using DotNetCore.CAP;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Savorboard.CAP.InMemoryMessageQueue; using Savorboard.CAP.InMemoryMessageQueue;
using VoloAbpExceptionHandlingOptions = Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions; using VoloAbpExceptionHandlingOptions = Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingOptions;
@ -799,9 +800,12 @@ public partial class MicroServiceApplicationsSingleModule
options.AutoValidate = false; options.AutoValidate = false;
}); });
services.Replace<CookieAuthenticationHandler, AbpCookieAuthenticationHandler>(ServiceLifetime.Scoped);
services.AddAuthentication() services.AddAuthentication()
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options =>
{
options.ExpireTimeSpan = TimeSpan.FromDays(365);
})
.AddAbpJwtBearer(options => .AddAbpJwtBearer(options =>
{ {
configuration.GetSection("AuthServer").Bind(options); configuration.GetSection("AuthServer").Bind(options);
@ -830,6 +834,8 @@ public partial class MicroServiceApplicationsSingleModule
} }
services.AddSameSiteCookiePolicy(); services.AddSameSiteCookiePolicy();
// 处理cookie中过时的ajax请求判断
services.Replace(ServiceDescriptor.Scoped<CookieAuthenticationHandler, AbpCookieAuthenticationHandler>());
} }
private void ConfigureCors(IServiceCollection services, IConfiguration configuration) private void ConfigureCors(IServiceCollection services, IConfiguration configuration)

185
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -1,40 +1,88 @@
using LINGYUN.Abp.AuditLogging.IP2Region; using LINGYUN.Abp.AuditLogging.IP.Location;
using LINGYUN.Abp.EventBus.CAP; using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.IP2Region;
using LY.MicroService.Applications.Single.EntityFrameworkCore;
using LY.MicroService.Applications.Single.EntityFrameworkCore.MySql;
using Volo.Abp.MailKit; using Volo.Abp.MailKit;
namespace LY.MicroService.Applications.Single; namespace LY.MicroService.Applications.Single;
[DependsOn( [DependsOn(
// 账户模块 应用服务
typeof(AbpAccountApplicationModule), typeof(AbpAccountApplicationModule),
// 账户模块 控制器
typeof(AbpAccountHttpApiModule), typeof(AbpAccountHttpApiModule),
// 账户模块 OpenIddict集成
typeof(AbpAccountWebOpenIddictModule), typeof(AbpAccountWebOpenIddictModule),
// 账户模块 模板
typeof(AbpAccountTemplatesModule),
// 审计日志模块 应用服务
typeof(AbpAuditingApplicationModule), typeof(AbpAuditingApplicationModule),
// 审计日志模块 控制器
typeof(AbpAuditingHttpApiModule), typeof(AbpAuditingHttpApiModule),
typeof(AbpAuditLoggingIP2RegionModule), // 审计日志模块 IP 地址定位
typeof(AbpAuditLoggingIPLocationModule),
// 审计日志模块 实体框架
typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule),
// 缓存模块 Redis集成
typeof(AbpCachingStackExchangeRedisModule),
// 缓存管理模块 Redis集成
typeof(AbpCachingManagementStackExchangeRedisModule), typeof(AbpCachingManagementStackExchangeRedisModule),
// 缓存管理模块 应用服务
typeof(AbpCachingManagementApplicationModule), typeof(AbpCachingManagementApplicationModule),
// 缓存管理模块 控制器
typeof(AbpCachingManagementHttpApiModule), typeof(AbpCachingManagementHttpApiModule),
// 身份认证模块 会话管理集成
typeof(AbpIdentityAspNetCoreSessionModule), typeof(AbpIdentityAspNetCoreSessionModule),
// 身份认证模块 会话中间件
typeof(AbpIdentitySessionAspNetCoreModule), typeof(AbpIdentitySessionAspNetCoreModule),
// 身份认证模块 通知集成
typeof(AbpIdentityNotificationsModule), typeof(AbpIdentityNotificationsModule),
// 身份认证模块 组织机构集成
typeof(AbpIdentityOrganizaztionUnitsModule),
// 身份认证模块 微信身份标识
typeof(AbpIdentityWeChatModule),
// 身份认证模块 领域服务
typeof(AbpIdentityDomainModule), typeof(AbpIdentityDomainModule),
// 身份认证模块 应用服务
typeof(AbpIdentityApplicationModule), typeof(AbpIdentityApplicationModule),
// 身份认证模块 控制器
typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityHttpApiModule),
// 身份认证模块 实体框架
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
// 多语言管理模块 领域服务
typeof(AbpLocalizationManagementDomainModule), typeof(AbpLocalizationManagementDomainModule),
// 多语言管理模块 应用服务
typeof(AbpLocalizationManagementApplicationModule), typeof(AbpLocalizationManagementApplicationModule),
// 多语言管理模块 控制器
typeof(AbpLocalizationManagementHttpApiModule), typeof(AbpLocalizationManagementHttpApiModule),
// 多语言管理模块 实体框架
typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
// Serilog扩展模块 应用程序信息
typeof(AbpSerilogEnrichersApplicationModule), typeof(AbpSerilogEnrichersApplicationModule),
// Serilog扩展模块 全局唯一Id
typeof(AbpSerilogEnrichersUniqueIdModule), typeof(AbpSerilogEnrichersUniqueIdModule),
// 消息模块 领域服务
typeof(AbpMessageServiceDomainModule), typeof(AbpMessageServiceDomainModule),
// 消息模块 应用服务
typeof(AbpMessageServiceApplicationModule), typeof(AbpMessageServiceApplicationModule),
// 消息模块 控制器
typeof(AbpMessageServiceHttpApiModule), typeof(AbpMessageServiceHttpApiModule),
// 消息模块 实体框架
typeof(AbpMessageServiceEntityFrameworkCoreModule), typeof(AbpMessageServiceEntityFrameworkCoreModule),
// 通知模块 领域服务
typeof(AbpNotificationsDomainModule), typeof(AbpNotificationsDomainModule),
// 通知模块 应用服务
typeof(AbpNotificationsApplicationModule), typeof(AbpNotificationsApplicationModule),
// 通知模块 控制器
typeof(AbpNotificationsHttpApiModule), typeof(AbpNotificationsHttpApiModule),
// 通知模块 实体框架
typeof(AbpNotificationsEntityFrameworkCoreModule), typeof(AbpNotificationsEntityFrameworkCoreModule),
//typeof(AbpIdentityServerSessionModule), //typeof(AbpIdentityServerSessionModule),
@ -42,154 +90,269 @@ namespace LY.MicroService.Applications.Single;
//typeof(AbpIdentityServerHttpApiModule), //typeof(AbpIdentityServerHttpApiModule),
//typeof(AbpIdentityServerEntityFrameworkCoreModule), //typeof(AbpIdentityServerEntityFrameworkCoreModule),
// OpenIddict扩展模块 自定义身份标识
typeof(LINGYUN.Abp.OpenIddict.AspNetCore.AbpOpenIddictAspNetCoreModule), typeof(LINGYUN.Abp.OpenIddict.AspNetCore.AbpOpenIddictAspNetCoreModule),
// OpenIddict扩展模块 会话
typeof(AbpOpenIddictAspNetCoreSessionModule), typeof(AbpOpenIddictAspNetCoreSessionModule),
// OpenIddict扩展模块 应用服务
typeof(AbpOpenIddictApplicationModule), typeof(AbpOpenIddictApplicationModule),
// OpenIddict扩展模块 控制器
typeof(AbpOpenIddictHttpApiModule), typeof(AbpOpenIddictHttpApiModule),
// OpenIddict扩展模块 实体框架
typeof(AbpOpenIddictEntityFrameworkCoreModule), typeof(AbpOpenIddictEntityFrameworkCoreModule),
// OpenIddict扩展模块 短信认证
typeof(AbpOpenIddictSmsModule), typeof(AbpOpenIddictSmsModule),
// OpenIddict扩展模块 平台认证
typeof(AbpOpenIddictPortalModule), typeof(AbpOpenIddictPortalModule),
// OpenIddict扩展模块 微信认证
typeof(AbpOpenIddictWeChatModule), typeof(AbpOpenIddictWeChatModule),
// OpenIddict扩展模块 企业微信认证
typeof(AbpOpenIddictWeChatWorkModule), typeof(AbpOpenIddictWeChatWorkModule),
//typeof(AbpOssManagementMinioModule), // 取消注释以使用Minio //typeof(AbpOssManagementMinioModule), // 取消注释以使用Minio
// 对象存储模块 文件系统
typeof(AbpOssManagementFileSystemModule), typeof(AbpOssManagementFileSystemModule),
// 对象存储模块 图片处理
typeof(AbpOssManagementImagingModule), typeof(AbpOssManagementImagingModule),
// 对象存储模块 应用服务
typeof(AbpOssManagementDomainModule), typeof(AbpOssManagementDomainModule),
// 对象存储模块 控制器
typeof(AbpOssManagementApplicationModule), typeof(AbpOssManagementApplicationModule),
// 对象存储模块 控制器
typeof(AbpOssManagementHttpApiModule), typeof(AbpOssManagementHttpApiModule),
// 对象存储模块 设置管理
typeof(AbpOssManagementSettingManagementModule), typeof(AbpOssManagementSettingManagementModule),
// 图形处理模块
typeof(AbpImagingImageSharpModule), typeof(AbpImagingImageSharpModule),
// 平台模块 领域服务
typeof(PlatformDomainModule), typeof(PlatformDomainModule),
// 平台模块 应用服务
typeof(PlatformApplicationModule), typeof(PlatformApplicationModule),
// 平台模块 控制器
typeof(PlatformHttpApiModule), typeof(PlatformHttpApiModule),
// 平台模块 实体框架
typeof(PlatformEntityFrameworkCoreModule), typeof(PlatformEntityFrameworkCoreModule),
// 平台模块 VueVbenAdmin设置
typeof(PlatformSettingsVueVbenAdminModule), typeof(PlatformSettingsVueVbenAdminModule),
// 平台模块 VueVbenAdmin主题
typeof(PlatformThemeVueVbenAdminModule), typeof(PlatformThemeVueVbenAdminModule),
// 平台模块 VueVbenAdmin导航
typeof(AbpUINavigationVueVbenAdminModule), typeof(AbpUINavigationVueVbenAdminModule),
// Saas模块 领域服务
typeof(AbpSaasDomainModule), typeof(AbpSaasDomainModule),
// Saas模块 应用服务
typeof(AbpSaasApplicationModule), typeof(AbpSaasApplicationModule),
// Saas模块 控制器
typeof(AbpSaasHttpApiModule), typeof(AbpSaasHttpApiModule),
// Saas模块 实体框架
typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpSaasEntityFrameworkCoreModule),
// 任务管理模块 领域服务
typeof(TaskManagementDomainModule), typeof(TaskManagementDomainModule),
// 任务管理模块 应用服务
typeof(TaskManagementApplicationModule), typeof(TaskManagementApplicationModule),
// 任务管理模块 控制器
typeof(TaskManagementHttpApiModule), typeof(TaskManagementHttpApiModule),
// 任务管理模块 实体框架
typeof(TaskManagementEntityFrameworkCoreModule), typeof(TaskManagementEntityFrameworkCoreModule),
// 文本模板模块 领域服务
typeof(AbpTextTemplatingDomainModule), typeof(AbpTextTemplatingDomainModule),
// 文本模板模块 应用服务
typeof(AbpTextTemplatingApplicationModule), typeof(AbpTextTemplatingApplicationModule),
// 文本模板模块 控制器
typeof(AbpTextTemplatingHttpApiModule), typeof(AbpTextTemplatingHttpApiModule),
// 文本模板模块 实体框架
typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(AbpTextTemplatingEntityFrameworkCoreModule),
// Webhooks模块 领域服务
typeof(AbpWebhooksModule), typeof(AbpWebhooksModule),
// Webhooks模块 事件总线
typeof(AbpWebhooksEventBusModule), typeof(AbpWebhooksEventBusModule),
// Webhooks模块 身份认证事件
typeof(AbpWebhooksIdentityModule), typeof(AbpWebhooksIdentityModule),
// Webhooks模块 Saas事件
typeof(AbpWebhooksSaasModule), typeof(AbpWebhooksSaasModule),
// Webhooks模块 应用服务
typeof(WebhooksManagementDomainModule), typeof(WebhooksManagementDomainModule),
// Webhooks模块 控制器
typeof(WebhooksManagementApplicationModule), typeof(WebhooksManagementApplicationModule),
// Webhooks模块 控制器
typeof(WebhooksManagementHttpApiModule), typeof(WebhooksManagementHttpApiModule),
// Webhooks模块 实体框架
typeof(WebhooksManagementEntityFrameworkCoreModule), typeof(WebhooksManagementEntityFrameworkCoreModule),
// 功能管理模块 应用服务
typeof(LINGYUN.Abp.FeatureManagement.AbpFeatureManagementApplicationModule), typeof(LINGYUN.Abp.FeatureManagement.AbpFeatureManagementApplicationModule),
// 功能管理模块 控制器
typeof(LINGYUN.Abp.FeatureManagement.HttpApi.AbpFeatureManagementHttpApiModule), typeof(LINGYUN.Abp.FeatureManagement.HttpApi.AbpFeatureManagementHttpApiModule),
// 功能管理模块 实体框架
typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule),
// 设置管理模块 领域服务
typeof(AbpSettingManagementDomainModule), typeof(AbpSettingManagementDomainModule),
// 设置管理模块 应用服务
typeof(AbpSettingManagementApplicationModule), typeof(AbpSettingManagementApplicationModule),
// 设置管理模块 控制器
typeof(AbpSettingManagementHttpApiModule), typeof(AbpSettingManagementHttpApiModule),
// 设置管理模块 实体框架
typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule),
// 权限管理模块 应用服务
typeof(LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule), typeof(LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule),
// 权限管理模块 控制器
typeof(AbpPermissionManagementHttpApiModule), typeof(AbpPermissionManagementHttpApiModule),
// 权限管理模块 身份认证集成
typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpPermissionManagementDomainIdentityModule),
// 权限管理模块 OpenIddict集成
typeof(AbpPermissionManagementDomainOpenIddictModule), typeof(AbpPermissionManagementDomainOpenIddictModule),
// typeof(AbpPermissionManagementDomainIdentityServerModule), // typeof(AbpPermissionManagementDomainIdentityServerModule),
// 权限管理模块 实体框架
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
// 权限管理模块 组织机构集成
typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理 typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理
typeof(SingleMigrationsEntityFrameworkCoreModule), // 单体服务实体框架迁移模块
typeof(AbpEntityFrameworkCoreMySQLModule), typeof(SingleMigrationsEntityFrameworkCoreMySqlModule),
// 实体框架MySQL集成
// typeof(AbpEntityFrameworkCoreMySQLModule),
// 短信模块 阿里云集成
typeof(AbpAliyunSmsModule), typeof(AbpAliyunSmsModule),
// 阿里云模块 设置管理
typeof(AbpAliyunSettingManagementModule), typeof(AbpAliyunSettingManagementModule),
// 认证模块 腾讯QQ集成
typeof(AbpAuthenticationQQModule), typeof(AbpAuthenticationQQModule),
// 认证模块 微信集成
typeof(AbpAuthenticationWeChatModule), typeof(AbpAuthenticationWeChatModule),
// 认证模块 JWT认证
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
// 授权模块 组织机构集成
typeof(AbpAuthorizationOrganizationUnitsModule), typeof(AbpAuthorizationOrganizationUnitsModule),
typeof(AbpIdentityOrganizaztionUnitsModule),
// 后台任务模块
typeof(AbpBackgroundTasksModule), typeof(AbpBackgroundTasksModule),
// 后台任务模块 行为处理
typeof(AbpBackgroundTasksActivitiesModule), typeof(AbpBackgroundTasksActivitiesModule),
// 后台任务模块 分布式锁
typeof(AbpBackgroundTasksDistributedLockingModule), typeof(AbpBackgroundTasksDistributedLockingModule),
// 后台任务模块 事件总线
typeof(AbpBackgroundTasksEventBusModule), typeof(AbpBackgroundTasksEventBusModule),
// 后台任务模块 异常处理
typeof(AbpBackgroundTasksExceptionHandlingModule), typeof(AbpBackgroundTasksExceptionHandlingModule),
// 后台任务模块 默认作业
typeof(AbpBackgroundTasksJobsModule), typeof(AbpBackgroundTasksJobsModule),
// 后台任务模块 通知
typeof(AbpBackgroundTasksNotificationsModule), typeof(AbpBackgroundTasksNotificationsModule),
// 后台任务模块 Quartz集成
typeof(AbpBackgroundTasksQuartzModule), typeof(AbpBackgroundTasksQuartzModule),
// 数据审计模块 应用服务
typeof(AbpDataProtectionManagementApplicationModule), typeof(AbpDataProtectionManagementApplicationModule),
// 数据审计模块 控制器
typeof(AbpDataProtectionManagementHttpApiModule), typeof(AbpDataProtectionManagementHttpApiModule),
// 数据审计模块 实体框架
typeof(AbpDataProtectionManagementEntityFrameworkCoreModule), typeof(AbpDataProtectionManagementEntityFrameworkCoreModule),
// Demo模块 应用服务
typeof(AbpDemoApplicationModule), typeof(AbpDemoApplicationModule),
// Demo模块 控制器
typeof(AbpDemoHttpApiModule), typeof(AbpDemoHttpApiModule),
// Demo模块 实体框架
typeof(AbpDemoEntityFrameworkCoreModule), typeof(AbpDemoEntityFrameworkCoreModule),
// Dapr模块 客户端
typeof(AbpDaprClientModule), typeof(AbpDaprClientModule),
// 异常处理模块
typeof(AbpExceptionHandlingModule), typeof(AbpExceptionHandlingModule),
// 异常处理模块 邮件通知
typeof(AbpEmailingExceptionHandlingModule), typeof(AbpEmailingExceptionHandlingModule),
// 功能限制模块
typeof(AbpFeaturesLimitValidationModule), typeof(AbpFeaturesLimitValidationModule),
// 客户端功能限制模块 Redis集成
typeof(AbpFeaturesValidationRedisClientModule), typeof(AbpFeaturesValidationRedisClientModule),
// 多语言模块
typeof(AbpAspNetCoreMvcLocalizationModule), typeof(AbpAspNetCoreMvcLocalizationModule),
// 多语言模块 语言映射
typeof(AbpLocalizationCultureMapModule), typeof(AbpLocalizationCultureMapModule),
// 多语言模块 持久化
typeof(AbpLocalizationPersistenceModule), typeof(AbpLocalizationPersistenceModule),
// OpenApi模块 授权
typeof(AbpOpenApiAuthorizationModule), typeof(AbpOpenApiAuthorizationModule),
// 消息模块 实时框架
typeof(AbpIMSignalRModule), typeof(AbpIMSignalRModule),
// 通知模块
typeof(AbpNotificationsModule), typeof(AbpNotificationsModule),
// 通知模块 默认通知
typeof(AbpNotificationsCommonModule), typeof(AbpNotificationsCommonModule),
// 通知模块 实时框架
typeof(AbpNotificationsSignalRModule), typeof(AbpNotificationsSignalRModule),
// 通知模块 邮件通知
typeof(AbpNotificationsEmailingModule), typeof(AbpNotificationsEmailingModule),
// 通知模块 微信小程序
typeof(AbpNotificationsWeChatMiniProgramModule),
// 多租户模块 版本
typeof(AbpMultiTenancyEditionsModule), typeof(AbpMultiTenancyEditionsModule),
// 腾讯QQ模块
typeof(AbpTencentQQModule), typeof(AbpTencentQQModule),
// 腾讯云模块 设置管理
typeof(AbpTencentCloudSettingManagementModule), typeof(AbpTencentCloudSettingManagementModule),
typeof(AbpIdentityWeChatModule), // 微信模块 微信小程序
typeof(AbpNotificationsWeChatMiniProgramModule),
typeof(AbpWeChatMiniProgramModule), typeof(AbpWeChatMiniProgramModule),
// 微信模块 微信公众号
typeof(AbpWeChatOfficialModule), typeof(AbpWeChatOfficialModule),
// 微信模块 微信公众号 应用服务
typeof(AbpWeChatOfficialApplicationModule), typeof(AbpWeChatOfficialApplicationModule),
// 微信模块 微信公众号 控制器
typeof(AbpWeChatOfficialHttpApiModule), typeof(AbpWeChatOfficialHttpApiModule),
// 微信模块 企业微信
typeof(AbpWeChatWorkModule), typeof(AbpWeChatWorkModule),
// 微信模块 企业微信 应用服务
typeof(AbpWeChatWorkApplicationModule), typeof(AbpWeChatWorkApplicationModule),
// 微信模块 企业微信 控制器
typeof(AbpWeChatWorkHttpApiModule), typeof(AbpWeChatWorkHttpApiModule),
// 微信模块 微信公众号 事件处理
typeof(AbpWeChatOfficialHandlersModule), typeof(AbpWeChatOfficialHandlersModule),
// 微信模块 企业微信 事件处理
typeof(AbpWeChatWorkHandlersModule), typeof(AbpWeChatWorkHandlersModule),
// 微信模块 设置管理
typeof(AbpWeChatSettingManagementModule), typeof(AbpWeChatSettingManagementModule),
// 数据迁移模块
typeof(AbpDataDbMigratorModule), typeof(AbpDataDbMigratorModule),
// IP解析模块 IP2Region集成
typeof(AbpIP2RegionModule),
// 分布式Id生成器模块
typeof(AbpIdGeneratorModule), typeof(AbpIdGeneratorModule),
// 自定义导航模块
typeof(AbpUINavigationModule), typeof(AbpUINavigationModule),
typeof(AbpAccountTemplatesModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpCachingStackExchangeRedisModule),
// Elsa工作流模块
typeof(AbpElsaModule), typeof(AbpElsaModule),
// Elsa工作流模块 工作流服务器
typeof(AbpElsaServerModule), typeof(AbpElsaServerModule),
// Elsa工作流模块 活动
typeof(AbpElsaActivitiesModule), typeof(AbpElsaActivitiesModule),
// Elsa工作流模块 实体框架
typeof(AbpElsaEntityFrameworkCoreModule), typeof(AbpElsaEntityFrameworkCoreModule),
// Elsa工作流模块 MySql集成
typeof(AbpElsaEntityFrameworkCoreMySqlModule), typeof(AbpElsaEntityFrameworkCoreMySqlModule),
// CAP事件总线模块
typeof(AbpCAPEventBusModule), typeof(AbpCAPEventBusModule),
// 数据导出模块 MiniExcel集成
typeof(AbpExporterMiniExcelModule), typeof(AbpExporterMiniExcelModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreSerilogModule),
typeof(AbpHttpClientWrapperModule), typeof(AbpHttpClientWrapperModule),

7
aspnet-core/tests/LINGYUN.Abp.IP2Region.Tests/LINGYUN/Abp/IP2Region/SearcherTest.cs

@ -1,4 +1,5 @@
using IP2Region.Net.XDB; using IP2Region.Net.XDB;
using LINGYUN.Abp.IP.Location;
using Shouldly; using Shouldly;
using System; using System;
using System.IO; using System.IO;
@ -24,9 +25,9 @@ public class SearcherTest : AbpIP2RegionTestBase
[InlineData("220.246.0.1", "中国香港")] [InlineData("220.246.0.1", "中国香港")]
public async void TestSearchLocation(string ip, string shouleBeRemarks) public async void TestSearchLocation(string ip, string shouleBeRemarks)
{ {
var provider = GetRequiredService<IIpLocationInfoProvider>(); var resolver = GetRequiredService<IIPLocationResolver>();
var locationInfo = await provider.GetLocationInfoAsync(ip); var result = await resolver.ResolveAsync(ip);
locationInfo.Remarks.ShouldBe(shouleBeRemarks); result.Location.Remarks.ShouldBe(shouleBeRemarks);
} }
[Theory] [Theory]

Loading…
Cancel
Save