Skip to content

Commit

Permalink
🐛 fix: 修复项目引用
Browse files Browse the repository at this point in the history
  • Loading branch information
colinin committed Jan 10, 2025
1 parent 9eadb82 commit 45902b4
Show file tree
Hide file tree
Showing 10 changed files with 222 additions and 64 deletions.
48 changes: 21 additions & 27 deletions aspnet-core/LINGYUN.MicroService.SingleProject.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -9,7 +9,7 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.SqlServer;

[DependsOn(
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpElsaEntityFrameworkCoreSqlServerModule),
// typeof(AbpElsaEntityFrameworkCoreSqlServerModule),
typeof(SingleMigrationsEntityFrameworkCoreModule)
)]
public class SingleMigrationsEntityFrameworkCoreSqlServerModule : AbpModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
Original file line number Diff line number Diff line change
@@ -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>());
}
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -9,16 +9,16 @@
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;
}
Expand Down Expand Up @@ -51,8 +51,8 @@ public async virtual Task<DeviceInfo> GetDeviceInfoAsync()

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand Down Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -799,9 +800,12 @@ private void ConfigureSecurity(IServiceCollection services, IConfiguration confi
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);
Expand Down Expand Up @@ -830,6 +834,8 @@ private void ConfigureSecurity(IServiceCollection services, IConfiguration confi
}

services.AddSameSiteCookiePolicy();
// 处理cookie中过时的ajax请求判断
services.Replace(ServiceDescriptor.Scoped<CookieAuthenticationHandler, AbpCookieAuthenticationHandler>());
}

private void ConfigureCors(IServiceCollection services, IConfiguration configuration)
Expand Down
Loading

0 comments on commit 45902b4

Please sign in to comment.