Browse Source

Merge pull request #1070 from colinin/fix-ref

🐛 fix: 修复项目引用
pull/1073/head
yx lin 1 year ago
committed by GitHub
parent
commit
193a2cd010
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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
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
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}"
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}"
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
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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}.Release|Any CPU.ActiveCfg = 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.Build.0 = Debug|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}.Release|Any CPU.ActiveCfg = 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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1920,13 +1916,11 @@ Global
{BC7A8662-4313-4F1D-B267-9B1B69444CD3} = {3AD66E47-B667-40D1-AE61-F5EC186241F7}
{7C35101B-EA29-4B3D-B424-FAD625977E4D} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{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}
{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
GlobalSection(ExtensibilityGlobals) = postSolution
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 System;
using Volo.Abp.EntityFrameworkCore;
@ -9,7 +9,7 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer;
[DependsOn(
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpElsaEntityFrameworkCoreSqlServerModule),
// typeof(AbpElsaEntityFrameworkCoreSqlServerModule),
typeof(SingleMigrationsEntityFrameworkCoreModule)
)]
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>
<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" />
</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 Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using LINGYUN.Abp.IP.Location;
using Volo.Abp.AspNetCore;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Identity.Session.AspNetCore;
[DependsOn(typeof(AbpAspNetCoreModule))]
[DependsOn(typeof(AbpIP2RegionModule))]
[DependsOn(typeof(AbpIPLocationModule))]
[DependsOn(typeof(AbpIdentitySessionModule))]
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 LINGYUN.Abp.IP2Region;
using LINGYUN.Abp.IP.Location;
using Microsoft.Extensions.Options;
using System;
using System.Threading.Tasks;
@ -9,16 +9,16 @@ using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Identity.Session.AspNetCore;
public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDependency
{
protected IIpLocationInfoProvider IpLocationInfoProvider { get; }
protected IIPLocationResolver IPLocationResolver { get; }
protected IWebClientInfoProvider WebClientInfoProvider { get; }
protected AbpIdentitySessionAspNetCoreOptions Options { get; }
public HttpContextDeviceInfoProvider(
IIpLocationInfoProvider ipLocationInfoProvider,
IIPLocationResolver iPLocationResolver,
IWebClientInfoProvider webClientInfoProvider,
IOptions<AbpIdentitySessionAspNetCoreOptions> options)
{
IpLocationInfoProvider = ipLocationInfoProvider;
IPLocationResolver = iPLocationResolver;
WebClientInfoProvider = webClientInfoProvider;
Options = options.Value;
}
@ -51,8 +51,8 @@ public class HttpContextDeviceInfoProvider : IDeviceInfoProvider, ITransientDepe
protected async virtual Task<string> GetRegion(string ipAddress)
{
var locationInfo = await IpLocationInfoProvider.GetLocationInfoAsync(ipAddress);
return locationInfo?.Remarks;
var locationInfo = await IPLocationResolver.ResolveAsync(ipAddress);
return locationInfo.Location?.Remarks;
}
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 Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using static OpenIddict.Abstractions.OpenIddictConstants;
namespace LINGYUN.Abp.OpenIddict.AspNetCore.Session;
[DependsOn(
typeof(AbpIdentitySessionAspNetCoreModule),
typeof(AbpIdentityDomainModule),
typeof(AbpOpenIddictAspNetCoreModule))]
typeof(AbpIdentitySessionAspNetCoreModule)
)]
public class AbpOpenIddictAspNetCoreSessionModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)

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

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

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

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

Loading…
Cancel
Save