From 2ac31c1243305a57f22233631150d90e1e32f9c0 Mon Sep 17 00:00:00 2001
From: wangjunzzz <>
Date: Wed, 24 Dec 2025 15:26:17 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=87=E7=BA=A7abp10?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aspnet-core/Directory.Build.Microsoft.targets | 30 +-
aspnet-core/Directory.Build.Volo.targets | 190 +-
aspnet-core/Directory.Build.targets | 48 +-
.../Lion.AbpPro.AspNetCore.csproj | 13 +-
.../AspNetCore/AbpProAspNetCoreModule.cs | 2 +
.../ServiceCollectionExtensions.cs | 8 +-
.../Swagger/CachingSwaggerProvider.cs | 52 +-
.../Swagger/EnumSchemaFilter.cs | 42 +-
.../Swagger/HiddenAbpDefaultApiFilter.cs | 96 +-
...Lion.AbpPro.CAP.EntityFrameworkCore.csproj | 2 +-
.../Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj | 2 +-
.../Lion.AbpPro.Cli.Core.csproj | 2 +-
.../Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj | 2 +-
.../Lion.AbpPro.Core/Lion.AbpPro.Core.csproj | 7 +-
.../Lion.AbpPro.ElasticSearch.csproj | 2 +-
...on.AbpPro.EntityFrameworkCore.Mysql.csproj | 2 +-
.../Lion.AbpPro.EntityFrameworkCore.csproj | 2 +-
.../Lion.AbpPro.Hangfire.csproj | 2 +-
.../Lion.AbpPro.HttpClient.csproj | 2 +-
.../Lion.AbpPro.Localization.csproj | 2 +-
.../Lion.AbpPro.SignalR.csproj | 2 +-
.../Lion.AbpPro.Starter.csproj | 2 +-
.../Lion.AbpPro.Core.Cli.Tests.csproj | 2 +-
.../Lion.AbpPro.Core.Tests.csproj | 2 +-
.../Lion.AbpPro.ElasticSearch.Tests.csproj | 2 +-
...on.AbpPro.EntityFrameworkCore.Tests.csproj | 2 +-
.../Lion.AbpPro.Localization.Tests.csproj | 2 +-
.../Lion.AbpPro.WebGateway.csproj | 2 +-
aspnet-core/global.json | 7 +
.../BasicManagementHttpApiHostModule.cs | 209 +-
.../Controllers/HomeController.cs | 3 +-
...anagementHttpApiHostMigrationsDbContext.cs | 1 -
.../GlobalUsings.cs | 24 +
...AbpPro.BasicManagement.HttpApi.Host.csproj | 3 +-
...sicManagement.Application.Contracts.csproj | 3 +-
...bpProApplicationConfigurationAppService.cs | 1 -
.../AuditLogs/AuditLogAppService.cs | 4 +-
...cManagementApplicationAutoMapperProfile.cs | 41 -
.../BasicManagementApplicationModule.cs | 8 -
.../IdentitySecurityLogAppService.cs | 6 +-
....AbpPro.BasicManagement.Application.csproj | 4 +-
.../OrganizationUnitAppService.cs | 14 +-
.../Roles/RoleAppService.cs | 7 +-
.../Tenants/VoloTenantAppService.cs | 3 +-
.../Users/AccountAppService.cs | 5 +-
.../Users/UserAppService.cs | 17 +-
...bpPro.BasicManagement.Domain.Shared.csproj | 2 +-
.../BasicManagementDomainModule.cs | 7 -
.../GlobalUsings.cs | 1 -
.../Lion.AbpPro.BasicManagement.Domain.csproj | 2 +-
...BasicManagement.EntityFrameworkCore.csproj | 2 +-
...pPro.BasicManagement.HttpApi.Client.csproj | 2 +-
...Lion.AbpPro.BasicManagement.HttpApi.csproj | 2 +-
...o.BasicManagement.Application.Tests.csproj | 2 +-
...AbpPro.BasicManagement.Domain.Tests.csproj | 2 +-
...anagement.EntityFrameworkCore.Tests.csproj | 2 +-
...ion.AbpPro.BasicManagement.TestBase.csproj | 2 +-
...taDictionaryManagementHttpApiHostModule.cs | 180 +-
.../GlobalUsings.cs | 1 -
...taDictionaryManagement.HttpApi.Host.csproj | 2 +-
...aryManagement.Application.Contracts.csproj | 2 +-
.../DataDictionaryAppService.cs | 6 +-
...yManagementApplicationAutoMapperProfile.cs | 14 -
...taDictionaryManagementApplicationModule.cs | 11 +-
.../GlobalUsings.cs | 2 -
...ataDictionaryManagement.Application.csproj | 3 +-
...aDictionaryManagement.Domain.Shared.csproj | 2 +-
.../DataDictionaries/DataDictionaryManager.cs | 6 +-
.../DataDictionaryDomainAutoMapperProfile.cs | 11 -
.../DataDictionaryDomainService.cs | 11 +-
.../DataDictionaryManagementDomainModule.cs | 13 +-
.../GlobalUsings.cs | 1 -
...Pro.DataDictionaryManagement.Domain.csproj | 3 +-
...onaryManagement.EntityFrameworkCore.csproj | 2 +-
...DictionaryManagement.HttpApi.Client.csproj | 2 +-
.../DataDictionaryController.cs | 6 +
.../GlobalUsings.cs | 3 -
...ro.DataDictionaryManagement.HttpApi.csproj | 2 +-
...tionaryManagement.Application.Tests.csproj | 2 +-
...ataDictionaryManagementDomainTestModule.cs | 7 -
.../GlobalUsings.cs | 1 -
...taDictionaryManagement.Domain.Tests.csproj | 2 +-
...anagement.EntityFrameworkCore.Tests.csproj | 2 +-
...o.DataDictionaryManagement.TestBase.csproj | 2 +-
.../FileManagementHttpApiHostModule.cs | 167 +-
.../GlobalUsings.cs | 1 -
....AbpPro.FileManagement.HttpApi.Host.csproj | 3 +-
...ileManagement.Application.Contracts.csproj | 3 +-
...eManagementApplicationAutoMapperProfile.cs | 11 -
.../FileManagementApplicationModule.cs | 8 +-
.../Files/FileAppService.cs | 4 +-
.../GlobalUsings.cs | 2 -
...n.AbpPro.FileManagement.Application.csproj | 4 +-
...AbpPro.FileManagement.Domain.Shared.csproj | 2 +-
.../FileManagementDomainAutoMapperProfile.cs | 13 -
.../FileManagementDomainModule.cs | 7 -
.../Files/FileObjectManager.cs | 13 +-
.../Lion.AbpPro.FileManagement.Domain.csproj | 3 +-
....FileManagement.EntityFrameworkCore.csproj | 2 +-
...bpPro.FileManagement.HttpApi.Client.csproj | 3 +-
.../Lion.AbpPro.FileManagement.HttpApi.csproj | 2 +-
...ro.FileManagement.Application.Tests.csproj | 2 +-
....AbpPro.FileManagement.Domain.Tests.csproj | 2 +-
...anagement.EntityFrameworkCore.Tests.csproj | 2 +-
...Lion.AbpPro.FileManagement.TestBase.csproj | 3 +-
.../GlobalUsings.cs | 1 -
.../LanguageManagementHttpApiHostModule.cs | 172 +-
...Pro.LanguageManagement.HttpApi.Host.csproj | 3 +-
...ageManagement.Application.Contracts.csproj | 2 +-
.../GlobalUsings.cs | 2 -
...eManagementApplicationAutoMapperProfile.cs | 15 -
.../LanguageManagementApplicationModule.cs | 11 +-
.../Languages/LanguageAppService.cs | 7 +-
...pPro.LanguageManagement.Application.csproj | 4 +-
...ro.LanguageManagement.Domain.Shared.csproj | 2 +-
.../DatabaseLanguageProvider.cs | 9 +-
.../GlobalUsings.cs | 2 -
...nguageManagementDomainAutoMapperProfile.cs | 15 -
.../LanguageManagementDomainModule.cs | 5 -
.../LanguageManagementDomainService.cs | 11 +-
.../LanguageTexts/LanguageTextManager.cs | 16 +-
.../Languages/LanguageManager.cs | 14 +-
...on.AbpPro.LanguageManagement.Domain.csproj | 3 +-
...guageManagement.EntityFrameworkCore.csproj | 2 +-
...o.LanguageManagement.HttpApi.Client.csproj | 2 +-
...n.AbpPro.LanguageManagement.HttpApi.csproj | 2 +-
...anguageManagement.Application.Tests.csproj | 2 +-
.../GlobalUsings.cs | 1 -
.../LanguageManagementDomainTestModule.cs | 7 -
...Pro.LanguageManagement.Domain.Tests.csproj | 2 +-
...anagement.EntityFrameworkCore.Tests.csproj | 2 +-
....AbpPro.LanguageManagement.TestBase.csproj | 2 +-
.../GlobalUsings.cs | 1 -
...NotificationManagement.HttpApi.Host.csproj | 2 +-
...NotificationManagementHttpApiHostModule.cs | 165 +-
...ionManagement.Application.Contracts.csproj | 2 +-
.../GlobalUsings.cs | 2 -
....NotificationManagement.Application.csproj | 4 +-
...nManagementApplicationAutoMapperProfile.cs | 20 -
...NotificationManagementApplicationModule.cs | 6 -
.../Notifications/NotificationAppService.cs | 5 +-
...otificationManagement.Domain.Shared.csproj | 3 +-
.../GlobalUsings.cs | 2 -
...bpPro.NotificationManagement.Domain.csproj | 3 +-
.../NotificationDomainAutoMapperProfile.cs | 13 -
.../NotificationManagementDomainModule.cs | 9 -
.../NotificationManagementDomainService.cs | 11 +-
.../Notifications/NotificationManager.cs | 7 +-
.../NotificationSubscriptionManager.cs | 7 +-
...ationManagement.EntityFrameworkCore.csproj | 2 +-
...tificationManagement.HttpApi.Client.csproj | 2 +-
...pPro.NotificationManagement.HttpApi.csproj | 2 +-
...icationManagement.Application.Tests.csproj | 2 +-
...NotificationManagement.Domain.Tests.csproj | 2 +-
...anagement.EntityFrameworkCore.Tests.csproj | 2 +-
...Pro.NotificationManagement.TestBase.csproj | 2 +-
.../Lion.AbpPro.HttpApi.Host/GlobalUsings.cs | 3 +-
.../Lion.AbpPro.HttpApi.Host.csproj | 3 +-
.../Lion.AbpPro.HttpApi.Host/appsettings.json | 3 +-
.../Lion.AbpPro.Application.Contracts.csproj | 3 +-
.../AbpProApplicationAutoMapperProfile.cs | 10 -
.../AbpProApplicationModule.cs | 4 -
.../Lion.AbpPro.Application/GlobalUsings.cs | 4 +-
.../Lion.AbpPro.Application.csproj | 3 +-
.../Lion.AbpPro.DbMigrator.csproj | 2 +-
.../Lion.AbpPro.DbMigrator/appsettings.json | 3 +-
.../Lion.AbpPro.Domain.Shared.csproj | 2 +-
.../Lion.AbpPro.Domain/AbpProDomainModule.cs | 4 -
.../Lion.AbpPro.Domain/AbpProDomainService.cs | 10 -
.../src/Lion.AbpPro.Domain/GlobalUsings.cs | 1 -
.../Lion.AbpPro.Domain.csproj | 2 +-
.../AbpProEntityFrameworkCoreModule.cs | 9 +-
.../AbpProMigrationsDbContextFactory.cs | 2 +-
.../GlobalUsings.cs | 1 -
.../Lion.AbpPro.EntityFrameworkCore.csproj | 6 +-
.../20251223131937_Init.Designer.cs | 0
.../Migrations/20251223131937_Init.cs | 0
...ner.cs => 20251223140343_Init.Designer.cs} | 775 +++---
...3033431_Init.cs => 20251223140343_Init.cs} | 887 ++++---
.../AbpProDbContextModelSnapshot.cs | 2198 -----------------
.../Lion.AbpPro.FreeSqlRepository.csproj | 2 +-
.../Lion.AbpPro.HttpApi.Client.csproj | 2 +-
.../Lion.AbpPro.HttpApi.csproj | 2 +-
.../Lion.AbpPro.Application.Tests.csproj | 3 +-
.../Lion.AbpPro.Domain.Tests.csproj | 3 +-
...on.AbpPro.EntityFrameworkCore.Tests.csproj | 2 +-
...Lion.AbpPro.FreeSqlRepository.Tests.csproj | 2 +-
...bpPro.HttpApi.Client.ConsoleTestApp.csproj | 3 +-
.../Lion.AbpPro.TestBase.csproj | 2 +-
189 files changed, 1398 insertions(+), 4616 deletions(-)
create mode 100644 aspnet-core/global.json
create mode 100644 aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
delete mode 100644 aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs
delete mode 100644 aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain/NotificationDomainAutoMapperProfile.cs
delete mode 100644 aspnet-core/services/src/Lion.AbpPro.Application/AbpProApplicationAutoMapperProfile.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.Designer.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20251223131937_Init.cs
rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251113033431_Init.Designer.cs => 20251223140343_Init.Designer.cs} (74%)
rename aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/{20251113033431_Init.cs => 20251223140343_Init.cs} (54%)
diff --git a/aspnet-core/Directory.Build.Microsoft.targets b/aspnet-core/Directory.Build.Microsoft.targets
index 938c0b67..1e807352 100644
--- a/aspnet-core/Directory.Build.Microsoft.targets
+++ b/aspnet-core/Directory.Build.Microsoft.targets
@@ -1,21 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
diff --git a/aspnet-core/Directory.Build.Volo.targets b/aspnet-core/Directory.Build.Volo.targets
index 2c848ba2..f949bc55 100644
--- a/aspnet-core/Directory.Build.Volo.targets
+++ b/aspnet-core/Directory.Build.Volo.targets
@@ -1,99 +1,99 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/Directory.Build.targets b/aspnet-core/Directory.Build.targets
index 98365e55..4f3bbd24 100644
--- a/aspnet-core/Directory.Build.targets
+++ b/aspnet-core/Directory.Build.targets
@@ -7,7 +7,8 @@
latest
1.0.0
Abp vNext Pro
- $(NoWarn);CS1591;CS0436;NU1504
+ $(NoWarnNuGet)$(NoWarn);CS1591;CS0436;
+ $(NoWarnNuGet);1902;NU1903
app
true
WangJunZzz
@@ -28,9 +29,9 @@
-
-
-
+
+
+
@@ -46,17 +47,17 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
@@ -81,13 +82,13 @@
-
+
-
+
-
+
@@ -95,8 +96,21 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
index 6dc5bfea..cb983e82 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.AspNetCore
@@ -15,7 +15,8 @@
-
+
+
@@ -36,13 +37,7 @@
-
-
-
-
-
-
-
+
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
index b0e78a10..52dc2495 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
@@ -1,7 +1,9 @@
using Lion.AbpPro.AspNetCore.Options;
+using Volo.Abp.Swashbuckle;
namespace Lion.AbpPro.AspNetCore;
+//[DependsOn(typeof(AbpSwashbuckleModule))]
public class AbpProAspNetCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
index 5c952413..0a44220a 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
@@ -4,7 +4,7 @@ using Lion.AbpPro.AspNetCore.Options;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.IdentityModel.Tokens;
-using Swagger;
+
using Volo.Abp.AspNetCore.Auditing;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
@@ -160,9 +160,9 @@ public static class ServiceCollectionExtensions
options.MapType(() => new OpenApiSchema() { Type = "file" });
options.SwaggerDoc(name, new OpenApiInfo { Title = name, Version = version });
options.DocInclusionPredicate((docName, description) => true);
- options.EnableAnnotations(); // 启用注解
- options.DocumentFilter();
- options.SchemaFilter();
+ //options.EnableAnnotations(); // 启用注解
+ //options.DocumentFilter();
+ //options.SchemaFilter();
// 加载所有xml注释,这里会导致swagger加载有点缓慢
var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml");
foreach (var xml in xmlPaths)
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
index cfd40fd5..ca4b8288 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
@@ -1,26 +1,26 @@
-namespace Swagger;
-
-///
-/// swagger注释加载慢,把文档添加到缓存
-///
-[Dependency(ReplaceServices = true)]
-[ExposeServices(typeof(ISwaggerProvider))]
-public class CachingSwaggerProvider : ISwaggerProvider, ITransientDependency
-{
- private static readonly ConcurrentDictionary _cache = new ConcurrentDictionary();
-
- private readonly SwaggerGenerator _swaggerGenerator;
-
- public CachingSwaggerProvider(
- IOptions optionsAccessor,
- IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
- ISchemaGenerator schemaGenerator)
- {
- _swaggerGenerator = new SwaggerGenerator(optionsAccessor.Value, apiDescriptionsProvider, schemaGenerator);
- }
-
- public OpenApiDocument GetSwagger(string documentName, string host = null, string basePath = null)
- {
- return _cache.GetOrAdd(documentName, (_) => _swaggerGenerator.GetSwagger(documentName, host, basePath));
- }
-}
\ No newline at end of file
+// namespace Swagger;
+//
+// ///
+// /// swagger注释加载慢,把文档添加到缓存
+// ///
+// [Dependency(ReplaceServices = true)]
+// [ExposeServices(typeof(ISwaggerProvider))]
+// public class CachingSwaggerProvider : ISwaggerProvider, ITransientDependency
+// {
+// private static readonly ConcurrentDictionary _cache = new ConcurrentDictionary();
+//
+// private readonly SwaggerGenerator _swaggerGenerator;
+//
+// public CachingSwaggerProvider(
+// IOptions optionsAccessor,
+// IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
+// ISchemaGenerator schemaGenerator)
+// {
+// _swaggerGenerator = new SwaggerGenerator(optionsAccessor.Value, apiDescriptionsProvider, schemaGenerator);
+// }
+//
+// public OpenApiDocument GetSwagger(string documentName, string host = null, string basePath = null)
+// {
+// return _cache.GetOrAdd(documentName, (_) => _swaggerGenerator.GetSwagger(documentName, host, basePath));
+// }
+// }
\ No newline at end of file
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
index 1197d5de..f0d9fd6e 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
@@ -1,21 +1,21 @@
-namespace Swagger;
-
-///
-/// swagger 枚举映射,
-/// 原因:前端代理生成枚举是数字
-///
-public class EnumSchemaFilter : ISchemaFilter
-{
- public void Apply(OpenApiSchema schema, SchemaFilterContext context)
- {
- if (context.Type.IsEnum)
- {
- var array = new OpenApiArray();
- array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n)));
- // NSwag
- schema.Extensions.Add("x-enumNames", array);
- // Openapi-generator
- schema.Extensions.Add("x-enum-varnames", array);
- }
- }
-}
\ No newline at end of file
+// namespace Swagger;
+//
+// ///
+// /// swagger 枚举映射,
+// /// 原因:前端代理生成枚举是数字
+// ///
+// public class EnumSchemaFilter : ISchemaFilter
+// {
+// public void Apply(OpenApiSchema schema, SchemaFilterContext context)
+// {
+// if (context.Type.IsEnum)
+// {
+// var array = new OpenApiArray();
+// array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n)));
+// // NSwag
+// schema.Extensions.Add("x-enumNames", array);
+// // Openapi-generator
+// schema.Extensions.Add("x-enum-varnames", array);
+// }
+// }
+// }
\ No newline at end of file
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
index e4155e36..2be59eba 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
@@ -1,48 +1,48 @@
-namespace Swagger;
-
-///
-/// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题
-/// 所有隐藏原生的api,重写路由
-///
-public class HiddenAbpDefaultApiFilter : IDocumentFilter
-{
- public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
- {
- foreach (ApiDescription apiDescription in context.ApiDescriptions)
- {
- if (apiDescription.TryGetMethodInfo(out MethodInfo method))
- {
- string key = "/" + apiDescription.RelativePath;
- var reuslt = IsHidden(key);
- if (reuslt) swaggerDoc.Paths.Remove(key);
- }
- }
- }
-
- private bool IsHidden(string key)
- {
- var list = GetHiddenAbpDefaultApiList();
- foreach (var item in list)
- {
- if (key.Contains(item)) return true;
- }
-
- return false;
- }
-
- private List GetHiddenAbpDefaultApiList()
- {
- return new List() {
- "/api/abp/multi-tenancy/tenants",
- "/api/account",
- "/api/feature-management/features",
- "/api/permission-management/permissions",
- "/api/identity/my-profile",
- "/api/identity",
- "/api/multi-tenancy/tenants",
- "/api/setting-management/emailing",
- "/configuration",
- "/outputcache"
- };
- }
-}
\ No newline at end of file
+// namespace Swagger;
+//
+// ///
+// /// 在使用nswag的时候,原生默认的api导致生产的代理类存在问题
+// /// 所有隐藏原生的api,重写路由
+// ///
+// public class HiddenAbpDefaultApiFilter : IDocumentFilter
+// {
+// public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
+// {
+// foreach (ApiDescription apiDescription in context.ApiDescriptions)
+// {
+// if (apiDescription.TryGetMethodInfo(out MethodInfo method))
+// {
+// string key = "/" + apiDescription.RelativePath;
+// var reuslt = IsHidden(key);
+// if (reuslt) swaggerDoc.Paths.Remove(key);
+// }
+// }
+// }
+//
+// private bool IsHidden(string key)
+// {
+// var list = GetHiddenAbpDefaultApiList();
+// foreach (var item in list)
+// {
+// if (key.Contains(item)) return true;
+// }
+//
+// return false;
+// }
+//
+// private List GetHiddenAbpDefaultApiList()
+// {
+// return new List() {
+// "/api/abp/multi-tenancy/tenants",
+// "/api/account",
+// "/api/feature-management/features",
+// "/api/permission-management/permissions",
+// "/api/identity/my-profile",
+// "/api/identity",
+// "/api/multi-tenancy/tenants",
+// "/api/setting-management/emailing",
+// "/configuration",
+// "/outputcache"
+// };
+// }
+// }
\ No newline at end of file
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj
index ac0ab42b..6cd40174 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion.AbpPro.CAP.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
Lion.AbpPro.CAP.EntityFrameworkCore
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj
index 6ef45adb..babd06fe 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion.AbpPro.CAP.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.CAP
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj
index bb07cd2a..9123cb47 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion.AbpPro.Cli.Core.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj
index a5ccb2a8..d80385b2 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion.AbpPro.Cli.csproj
@@ -2,7 +2,7 @@
Exe
- net9.0
+ net10.0
true
Lion.AbpPro.Cli
lion.abp
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
index 6d8c78b7..70a3bdf5 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
@@ -1,12 +1,13 @@
- net9.0
+ net10.0
Lion.AbpPro.Core
-
+
-
+
+
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj
index 77c75529..1fcddddf 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.ElasticSearch/Lion.AbpPro.ElasticSearch.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj
index 0e3e5182..bc65739d 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion.AbpPro.EntityFrameworkCore.Mysql.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj
index 550cbac4..8713c429 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
enable
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj
index 4b177f7a..a3d78e27 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Hangfire/Lion.AbpPro.Hangfire.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj
index c5cf6d20..038588c8 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.HttpClient/Lion.AbpPro.HttpClient.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.HttpClient
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj
index 8b57e0fe..daebb89d 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion.AbpPro.Localization.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.Localization
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj
index 74eb0528..583470cd 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.SignalR/Lion.AbpPro.SignalR.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.SignalR
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj
index 7f3f5d60..11a1fc81 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Starter/Lion.AbpPro.Starter.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
Lion.AbpPro.Starter
diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj
index b4bb58ec..6244403c 100644
--- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj
+++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion.AbpPro.Core.Cli.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
false
diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj
index 6861fc97..d4e31bfe 100644
--- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj
+++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion.AbpPro.Core.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
false
diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj
index 6adfefc5..17b9e2d1 100644
--- a/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj
+++ b/aspnet-core/frameworks/test/Lion.AbpPro.ElasticSearch.Tests/Lion.AbpPro.ElasticSearch.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
false
true
diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj
index 28a6f525..426178ea 100644
--- a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj
+++ b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
enable
true
diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj
index 6a471fab..9c65afb0 100644
--- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj
+++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion.AbpPro.Localization.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
enable
false
diff --git a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj
index b4e1981a..9b37f7ba 100644
--- a/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj
+++ b/aspnet-core/gateways/Lion.AbpPro.WebGateway/Lion.AbpPro.WebGateway.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
diff --git a/aspnet-core/global.json b/aspnet-core/global.json
new file mode 100644
index 00000000..a11f48e1
--- /dev/null
+++ b/aspnet-core/global.json
@@ -0,0 +1,7 @@
+{
+ "sdk": {
+ "version": "10.0.0",
+ "rollForward": "latestMajor",
+ "allowPrerelease": true
+ }
+}
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
index 0264bdd5..8e5a1bfd 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
@@ -1,28 +1,3 @@
-using System.Text;
-using Lion.AbpPro.AspNetCore;
-using Microsoft.AspNetCore.Authentication.JwtBearer;
-using Microsoft.AspNetCore.DataProtection;
-using Lion.AbpPro.BasicManagement.EntityFrameworkCore;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.IdentityModel.Tokens;
-using StackExchange.Redis;
-using Microsoft.OpenApi.Models;
-using Swagger;
-using Swashbuckle.AspNetCore.SwaggerUI;
-using Volo.Abp;
-using Volo.Abp.AspNetCore.ExceptionHandling;
-using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
-using Volo.Abp.AspNetCore.Serilog;
-using Volo.Abp.Autofac;
-using Volo.Abp.Caching;
-using Volo.Abp.Caching.StackExchangeRedis;
-using Volo.Abp.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore.MySQL;
-using Volo.Abp.Localization;
-using Volo.Abp.Modularity;
-using Volo.Abp.Swashbuckle;
-using Volo.Abp.VirtualFileSystem;
-
namespace Lion.AbpPro.BasicManagement;
[DependsOn(
@@ -39,25 +14,25 @@ namespace Lion.AbpPro.BasicManagement;
)]
public class BasicManagementHttpApiHostModule : AbpModule
{
- private const string DefaultCorsPolicyName = "Default";
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
- ConfigureCache(context);
- ConfigureSwaggerServices(context);
- ConfigureJwtAuthentication(context);
+ context.Services
+ .AddAbpProAuditLog()
+ .AddAbpProAuthentication()
+ .AddAbpProMultiTenancy()
+ .AddAbpProHealthChecks()
+ .AddAbpProTenantResolvers()
+ .AddAbpProLocalization()
+ .AddAbpProExceptions()
+ .AddAbpProSwagger("BasicManagement");
Configure(options => { options.UseMySQL(); });
- Configure(options =>
- {
- options.SendExceptionsDetailsToClients = false;
- });
- ConfigureVirtualFileSystem(context);
}
-
+
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
-
+
+
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
@@ -77,164 +52,4 @@ public class BasicManagementHttpApiHostModule : AbpModule
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
- ///
- /// 配置虚拟文件系统
- ///
- ///
- private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded();
- });
- }
- ///
- /// Redis缓存
- ///
- private void ConfigureCache(ServiceConfigurationContext context)
- {
- Configure(
- options => { options.KeyPrefix = "AbpPro:"; });
- var configuration = context.Services.GetConfiguration();
- var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
- context.Services
- .AddDataProtection()
- .PersistKeysToStackExchangeRedis(redis, "AbpPro-Protection-Keys");
- }
-
- private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
- {
- context.Services.AddSwaggerGen(
- options =>
- {
- // 文件下载类型
- options.MapType(() => new OpenApiSchema() { Type = "file" });
-
- options.SwaggerDoc("BasicManagement",
- new OpenApiInfo { Title = "BasicManagement API", Version = "v1" });
- options.DocInclusionPredicate((docName, description) => true);
- options.EnableAnnotations(); // 启用注解
- options.DocumentFilter();
- options.SchemaFilter();
- // 加载所有xml注释,这里会导致swagger加载有点缓慢
- var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml");
- foreach (var xml in xmlPaths)
- {
- options.IncludeXmlComments(xml, true);
- }
-
- options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme,
- new OpenApiSecurityScheme()
- {
- Description = "直接在下框输入JWT生成的Token",
- Name = "Authorization",
- In = ParameterLocation.Header,
- Type = SecuritySchemeType.Http,
- Scheme = JwtBearerDefaults.AuthenticationScheme,
- BearerFormat = "JWT"
- });
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- {
- Type = ReferenceType.SecurityScheme, Id = "Bearer"
- }
- },
- new List()
- }
- });
-
- options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme()
- {
- Type = SecuritySchemeType.ApiKey,
- In = ParameterLocation.Header,
- Name = "Accept-Language",
- Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans",
- });
-
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- { Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
- },
- Array.Empty()
- }
- });
- });
- }
-
- ///
- /// 配置JWT
- ///
- private void ConfigureJwtAuthentication(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- context.Services.AddAuthentication(options =>
- {
- options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
- options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
- })
- .AddJwtBearer(options =>
- {
- options.TokenValidationParameters =
- new TokenValidationParameters()
- {
- // 是否开启签名认证
- ValidateIssuerSigningKey = true,
- ValidateIssuer = true,
- ValidateAudience = true,
- ValidateLifetime = true,
- //ClockSkew = TimeSpan.Zero,
- ValidIssuer = configuration["Jwt:Issuer"],
- ValidAudience = configuration["Jwt:Audience"],
- IssuerSigningKey =
- new SymmetricSecurityKey(
- Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"]))
- };
-
- options.Events = new JwtBearerEvents
- {
- OnMessageReceived = currentContext =>
- {
- var path = currentContext.HttpContext.Request.Path;
- if (path.StartsWithSegments("/login"))
- {
- return Task.CompletedTask;
- }
-
- var accessToken = string.Empty;
- if (currentContext.HttpContext.Request.Headers.ContainsKey("Authorization"))
- {
- accessToken = currentContext.HttpContext.Request.Headers["Authorization"];
- if (!string.IsNullOrWhiteSpace(accessToken))
- {
- accessToken = accessToken.Split(" ").LastOrDefault();
- }
- }
-
- if (accessToken.IsNullOrWhiteSpace())
- {
- accessToken = currentContext.Request.Query["access_token"].FirstOrDefault();
- }
-
- if (accessToken.IsNullOrWhiteSpace())
- {
- accessToken = currentContext.Request.Cookies[DefaultCorsPolicyName];
- }
-
- currentContext.Token = accessToken;
- currentContext.Request.Headers.Remove("Authorization");
- currentContext.Request.Headers.Append("Authorization", $"Bearer {accessToken}");
-
- return Task.CompletedTask;
- }
- };
- });
- }
}
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs
index 8455b54d..7c2fcc65 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Controllers/HomeController.cs
@@ -1,5 +1,4 @@
-using Microsoft.AspNetCore.Mvc;
-using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.BasicManagement.Controllers;
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs
index 9a3bd045..f9e18854 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/EntityFrameworkCore/BasicManagementHttpApiHostMigrationsDbContext.cs
@@ -1,5 +1,4 @@
using Microsoft.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.BasicManagement.EntityFrameworkCore;
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
new file mode 100644
index 00000000..2b80a9bb
--- /dev/null
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
@@ -0,0 +1,24 @@
+// Global using directives
+
+global using System.Text;
+global using Lion.AbpPro.AspNetCore;
+global using Lion.AbpPro.BasicManagement.EntityFrameworkCore;
+global using Microsoft.AspNetCore.Authentication.JwtBearer;
+global using Microsoft.AspNetCore.DataProtection;
+global using Microsoft.AspNetCore.Mvc;
+global using Microsoft.IdentityModel.Tokens;
+global using StackExchange.Redis;
+
+global using Swashbuckle.AspNetCore.SwaggerUI;
+global using Volo.Abp;
+global using Volo.Abp.AspNetCore.ExceptionHandling;
+global using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
+global using Volo.Abp.AspNetCore.Serilog;
+global using Volo.Abp.Autofac;
+global using Volo.Abp.Caching;
+global using Volo.Abp.Caching.StackExchangeRedis;
+global using Volo.Abp.EntityFrameworkCore;
+global using Volo.Abp.EntityFrameworkCore.MySQL;
+global using Volo.Abp.Localization;
+global using Volo.Abp.Modularity;
+global using Volo.Abp.Swashbuckle;
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
index 263d3ec4..b124e8eb 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
@@ -1,10 +1,11 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
true
Lion.AbpPro.BasicManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj
index e7f86a54..689a9cfa 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application.Contracts/Lion.AbpPro.BasicManagement.Application.Contracts.csproj
@@ -1,7 +1,8 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs
index 8f3345dd..bbe3d7f5 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/ApplicationConfigurations/AbpProApplicationConfigurationAppService.cs
@@ -75,7 +75,6 @@ public class AbpProApplicationConfigurationAppService : ApplicationService, IAbp
Clock = GetClockConfig(),
ObjectExtensions = _cachedObjectExtensionsDtoService.Get()
};
-
if (options.IncludeLocalizationResources)
{
result.Localization = await GetLocalizationConfigAsync(options);
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs
index a5d3c788..c6398f41 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/AuditLogs/AuditLogAppService.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.BasicManagement.AuditLogs
{
[Authorize(Policy = BasicManagementPermissions.SystemManagement.AuditLog)]
@@ -57,7 +59,7 @@ namespace Lion.AbpPro.BasicManagement.AuditLogs
input.HttpStatusCode,
true);
- return new PagedResultDto(totalCount, ObjectMapper.Map, List>(list));
+ return new PagedResultDto(totalCount, list.Adapt>());
}
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs
deleted file mode 100644
index 5b920d6b..00000000
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationAutoMapperProfile.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using AutoMapper;
-using Lion.AbpPro.BasicManagement.AuditLogs;
-using Lion.AbpPro.BasicManagement.IdentitySecurityLogs;
-using Lion.AbpPro.BasicManagement.Users.Dtos;
-
-namespace Lion.AbpPro.BasicManagement;
-
-public class BasicManagementApplicationAutoMapperProfile : Profile
-{
- public BasicManagementApplicationAutoMapperProfile()
- {
- CreateMap()
- .ForMember(dest => dest.ExecutionTime,
- opt => opt.MapFrom(s => s.ExecutionTime.ToString("O")));
- CreateMap()
- .ForMember(dest => dest.ExecutionTime,
- opt => opt.MapFrom(s => s.ExecutionTime.ToString("O")));
-
- CreateMap()
- .ForMember(dest => dest.ChangeTypeDescription,
- opt => opt.MapFrom(s => s.ChangeType.ToDescription()))
- .ForMember(dest => dest.ChangeTime,
- opt => opt.MapFrom(s => s.ChangeTime.ToString("O")));
- CreateMap();
-
- CreateMap()
- .ForMember(dest => dest.Token, opt => opt.Ignore());
- CreateMap()
- .ForMember(e => e.CreationTimeFormat, opt => opt.Ignore())
- .ForMember(e => e.Status, opt => opt.Ignore());
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs
index 6095e2d4..67da984d 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/BasicManagementApplicationModule.cs
@@ -3,7 +3,6 @@ using Lion.AbpPro.BasicManagement.Roles;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Volo.Abp.Account;
-using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
using Volo.Abp.FeatureManagement;
@@ -18,7 +17,6 @@ namespace Lion.AbpPro.BasicManagement;
typeof(BasicManagementApplicationContractsModule),
typeof(AbpDddApplicationModule),
typeof(AbpIdentityAspNetCoreModule),
- typeof(AbpAutoMapperModule),
typeof(AbpAccountApplicationModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
@@ -31,12 +29,6 @@ public class BasicManagementApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- context.Services.AddAutoMapperObjectMapper();
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
-
Configure(options =>
{
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs
index b1763433..ca244655 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/IdentitySecurityLogs/IdentitySecurityLogAppService.cs
@@ -1,4 +1,6 @@
-namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs;
+using Mapster;
+
+namespace Lion.AbpPro.BasicManagement.IdentitySecurityLogs;
public class IdentitySecurityLogAppService : BasicManagementAppService, IIdentitySecurityLogAppService
{
@@ -41,6 +43,6 @@ public class IdentitySecurityLogAppService : BasicManagementAppService, IIdentit
input.ClientId,
input.CorrelationId);
- return new PagedResultDto(totalCount, ObjectMapper.Map, List>(list));
+ return new PagedResultDto(totalCount,list.Adapt>());
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
index 02514415..f7cd94ba 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
@@ -1,12 +1,12 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
+ NU1903;NU1902;$(NoWarnNuGet)
-
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs
index bbfe483f..f9217795 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/OrganizationUnits/OrganizationUnitAppService.cs
@@ -1,4 +1,6 @@
-namespace Lion.AbpPro.BasicManagement.OrganizationUnits;
+using Mapster;
+
+namespace Lion.AbpPro.BasicManagement.OrganizationUnits;
[Authorize(Policy = BasicManagementPermissions.SystemManagement.OrganizationUnitManagement.Default)]
public class OrganizationUnitAppService : BasicManagementAppService, IOrganizationUnitAppService
@@ -20,7 +22,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati
public virtual async Task> GetTreeAsync()
{
var organizationUnits = await _organizationUnitRepository.GetListAsync();
- var organizationUnitDtos = ObjectMapper.Map, List>(organizationUnits);
+ var organizationUnitDtos =organizationUnits.Adapt>();
return ConvertToTree(organizationUnitDtos);
}
@@ -100,7 +102,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati
skipCount: input.SkipCount,
filter: input.Filter
);
- listResult = ObjectMapper.Map, List>(list);
+ listResult = list.Adapt>();
}
return new PagedResultDto(count, listResult);
@@ -121,7 +123,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati
skipCount: input.SkipCount,
filter: input.Filter
);
- listResult = ObjectMapper.Map, List>(users);
+ listResult = users.Adapt>();
}
return new PagedResultDto(count, listResult);
@@ -137,7 +139,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati
if (count > 0)
{
var list = await _organizationUnitRepository.GetRolesAsync(organizationUnit, maxResultCount: input.PageSize, skipCount: input.SkipCount);
- listResult = ObjectMapper.Map, List>(list);
+ listResult = list.Adapt>();
}
return new PagedResultDto(count, listResult);
@@ -158,7 +160,7 @@ public class OrganizationUnitAppService : BasicManagementAppService, IOrganizati
skipCount: input.SkipCount,
filter: input.Filter
);
- listResult = ObjectMapper.Map, List>(roles);
+ listResult = roles.Adapt>();
}
return new PagedResultDto(count, listResult);
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs
index 4698e4d0..d6ebd201 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Roles/RoleAppService.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.BasicManagement.Roles;
[Authorize(Policy = IdentityPermissions.Roles.Default)]
@@ -27,8 +29,7 @@ public class RoleAppService : BasicManagementAppService, IRoleAppService
List source =
await _roleRepository.GetListAsync()
.ConfigureAwait(continueOnCapturedContext: false);
- return new ListResultDto(
- ObjectMapper.Map, List>(source));
+ return new ListResultDto(source.Adapt>());
}
///
@@ -50,7 +51,7 @@ public class RoleAppService : BasicManagementAppService, IRoleAppService
return new PagedResultDto(
await _roleRepository.GetCountAsync(request.Filter)
.ConfigureAwait(continueOnCapturedContext: false),
- ObjectMapper.Map, List>(list));
+ list.Adapt>());
}
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs
index 1f269678..5bb58d9f 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Tenants/VoloTenantAppService.cs
@@ -1,3 +1,4 @@
+using Mapster;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.SettingManagement;
@@ -73,7 +74,7 @@ namespace Lion.AbpPro.BasicManagement.Tenants
result.TotalCount = tenant.ConnectionStrings.Count;
- var items = ObjectMapper.Map, List>(tenant.ConnectionStrings);
+ var items = tenant.ConnectionStrings.Adapt>();
if (input.Name.IsNotNullOrWhiteSpace())
{
items = items.Where(e => e.Name.ToLower().Contains(input.Name.ToLower())).ToList();
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs
index a04a1979..8650c8ea 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/AccountAppService.cs
@@ -1,9 +1,10 @@
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
-using IdentityModel;
+using Duende.IdentityModel;
using Lion.AbpPro.BasicManagement.ConfigurationOptions;
using Lion.AbpPro.BasicManagement.Users.Dtos;
+using Mapster;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.IdentityModel.Tokens;
@@ -82,7 +83,7 @@ namespace Lion.AbpPro.BasicManagement.Users
if (roles == null || roles.Count == 0) throw new AbpAuthorizationException();
var token = GenerateJwt(user.Id, user.UserName, user.Name, user.Email,
user.TenantId.ToString(), roles.ToList());
- var loginOutput = ObjectMapper.Map(user);
+ var loginOutput = user.Adapt();
loginOutput.Token = token;
loginOutput.Roles = roles.ToList();
return loginOutput;
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs
index 396ca5e7..5bdbcc19 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Users/UserAppService.cs
@@ -2,6 +2,7 @@ using System.Security.Claims;
using Lion.AbpPro.BasicManagement.Users.Dtos;
using Magicodes.ExporterAndImporter.Excel;
using Magicodes.ExporterAndImporter.Excel.AspNetCore;
+using Mapster;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
@@ -56,8 +57,7 @@ namespace Lion.AbpPro.BasicManagement.Users
var source = await _identityUserRepository
.GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter);
- return new PagedResultDto(count,
- base.ObjectMapper.Map, List>(source));
+ return new PagedResultDto(count,source.Adapt>());
}
public async Task> ListAllAsync(PagingUserListInput input)
@@ -73,7 +73,7 @@ namespace Lion.AbpPro.BasicManagement.Users
var source = await _identityUserRepository
.GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter);
- return ObjectMapper.Map, List>(source);
+ return source.Adapt>();
}
///
@@ -91,7 +91,7 @@ namespace Lion.AbpPro.BasicManagement.Users
};
var source = await _identityUserRepository
.GetListAsync(request.Sorting, request.MaxResultCount, request.SkipCount, request.Filter);
- var result = ObjectMapper.Map, List>(source);
+ var result = source.Adapt>();
var bytes = await _excelExporter.ExportAsByteArray(result);
return new XlsxFileResult(bytes: bytes, fileDownloadName: $"用户导出列表{Clock.Now:yyyyMMdd}");
}
@@ -132,9 +132,7 @@ namespace Lion.AbpPro.BasicManagement.Users
public virtual async Task> GetRoleByUserId(IdInput input)
{
var roles = await _identityUserRepository.GetRolesAsync(input.Id);
- return new ListResultDto(
- ObjectMapper.Map, List>(roles)
- );
+ return new ListResultDto(roles.Adapt>());
}
///
@@ -224,7 +222,7 @@ namespace Lion.AbpPro.BasicManagement.Users
throw new BusinessException(BasicManagementErrorCodes.UserNotExist);
}
- return ObjectMapper.Map(user);
+ return user.Adapt();
}
public virtual async Task MyProfileAsync()
@@ -234,8 +232,7 @@ namespace Lion.AbpPro.BasicManagement.Users
{
throw new BusinessException(BasicManagementErrorCodes.UserNotExist);
}
-
- return ObjectMapper.Map(user);
+ return user.Adapt();
}
public virtual async Task NeedChangePasswordAsync()
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj
index 8794dbba..ebdcd80a 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/Lion.AbpPro.BasicManagement.Domain.Shared.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
true
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs
index 43639958..8b9bcfe3 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/BasicManagementDomainModule.cs
@@ -13,11 +13,4 @@
)]
public class BasicManagementDomainModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.AddMaps();
- });
- }
}
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs
index d4b72d28..f27ccc71 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/GlobalUsings.cs
@@ -5,7 +5,6 @@ global using Lion.AbpPro.BasicManagement.Localization;
global using Lion.AbpPro.Core;
global using Volo.Abp.Auditing;
global using Volo.Abp.AuditLogging;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.BackgroundJobs;
global using Volo.Abp.Domain;
global using Volo.Abp.Domain.Services;
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj
index 6ccd3ed0..48d21cdc 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain/Lion.AbpPro.BasicManagement.Domain.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj
index d0581476..95176066 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.EntityFrameworkCore/Lion.AbpPro.BasicManagement.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj
index 0e56e4c4..56e5ce77 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi.Client/Lion.AbpPro.BasicManagement.HttpApi.Client.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj
index e48384f9..62688ad5 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.HttpApi/Lion.AbpPro.BasicManagement.HttpApi.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj
index a1fe6c68..19a968e2 100644
--- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj
+++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Application.Tests/Lion.AbpPro.BasicManagement.Application.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj
index 7b1de812..76849c15 100644
--- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj
+++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.Domain.Tests/Lion.AbpPro.BasicManagement.Domain.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj
index d0ad4b36..144ed9e0 100644
--- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj
+++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests/Lion.AbpPro.BasicManagement.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj
index 2bbf5a01..6e0b3fd7 100644
--- a/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj
+++ b/aspnet-core/modules/BasicManagement/test/Lion.AbpPro.BasicManagement.TestBase/Lion.AbpPro.BasicManagement.TestBase.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.BasicManagement
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
index bc66f7f6..235c9359 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
@@ -1,4 +1,6 @@
using Lion.AbpPro.AspNetCore;
+using Microsoft.OpenApi;
+using Swashbuckle.AspNetCore.SwaggerUI;
namespace Lion.AbpPro.DataDictionaryManagement
{
@@ -16,191 +18,45 @@ namespace Lion.AbpPro.DataDictionaryManagement
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule),
typeof(AbpProAspNetCoreModule)
- )]
+ )]
public class DataDictionaryManagementHttpApiHostModule : AbpModule
{
- private const string DefaultCorsPolicyName = "Default";
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
-
- // Configure(options =>
- // {
- // options.IsEnabled = MultiTenancyConsts.IsEnabled;
- // });
- context.Services.AddAlwaysAllowAuthorization();
- ConfigureSwaggerServices(context);
- ConfigureCache(context);
- ConfigureCors(context);
- ConfigureDB();
- ConfigureLocalization();
- ConfigureVirtualFileSystem(context);
+ context.Services
+ .AddAbpProAuditLog()
+ .AddAbpProAuthentication()
+ .AddAbpProMultiTenancy()
+ .AddAbpProHealthChecks()
+ .AddAbpProTenantResolvers()
+ .AddAbpProLocalization()
+ .AddAbpProExceptions()
+ .AddAbpProSwagger("DataDictionaryManagement");
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
- var env = context.GetEnvironment();
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseErrorPage();
- app.UseHsts();
- }
- app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
- app.UseCors(DefaultCorsPolicyName);
+ app.UseCors();
app.UseAuthentication();
- // if (MultiTenancyConsts.IsEnabled)
- // {
- // app.UseMultiTenancy();
- // }
+ app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
- options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
-
- var configuration = context.GetConfiguration();
- options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
- options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
- options.OAuthScopes("DataDictionaryManagement");
+ options.SwaggerEndpoint("/swagger/DataDictionaryManagement/swagger.json", "DataDictionaryManagement API");
+ options.DocExpansion(DocExpansion.None);
+ options.DefaultModelsExpandDepth(-1);
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
- }
-
- ///
- /// 配置跨域
- ///
- ///
- private void ConfigureCors(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- context.Services.AddCors(options =>
- {
- options.AddPolicy(DefaultCorsPolicyName, builder =>
- {
- builder
- .WithOrigins(
- configuration["App:CorsOrigins"]
- .Split(",", StringSplitOptions.RemoveEmptyEntries)
- .Select(o => o.RemovePostFix("/"))
- .ToArray()
- )
- .WithAbpExposedHeaders()
- .SetIsOriginAllowedToAllowWildcardSubdomains()
- .AllowAnyHeader()
- .AllowAnyMethod()
- .AllowCredentials();
- });
- });
- }
-
- ///
- /// 配置SwaggerUI
- ///
- ///
- private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
- {
- context.Services.AddSwaggerGen(
- options =>
- {
- options.SwaggerDoc("v1", new OpenApiInfo {Title = "DataDictionaryManagement API", Version = "v1"});
-
- options.DocInclusionPredicate((docName, description) => true);
-
- #region 添加token
-
- options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme()
- {
- Description = "请输入Token",
- Name = "Authorization",
- In = ParameterLocation.Header,
- Type = SecuritySchemeType.Http,
- Scheme = JwtBearerDefaults.AuthenticationScheme,
- BearerFormat = "JWT"
- });
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- {
- Type = ReferenceType.SecurityScheme, Id = "Bearer"
- }
- },
- new List()
- }
- });
-
- #endregion
- });
- }
-
- ///
- /// Redis缓存
- ///
- ///
- private void ConfigureCache(ServiceConfigurationContext context)
- {
- var hostingEnvironment = context.Services.GetHostingEnvironment();
- var configuration = context.Services.GetConfiguration();
- Configure(options => { options.KeyPrefix = "DataDictionaryManagement:"; });
-
- if (!hostingEnvironment.IsDevelopment())
- {
- var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
- context.Services
- .AddDataProtection()
- .PersistKeysToStackExchangeRedis(redis, "DataDictionaryManagement-Protection-Keys");
- }
- }
-
- private void ConfigureDB()
- {
- Configure(options => { options.UseMySQL(); });
- }
-
- ///
- ///配置本地化
- ///
- private void ConfigureLocalization()
- {
- Configure(options =>
- {
- options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
- options.Languages.Add(new LanguageInfo("en", "en", "English"));
- options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
- options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
- options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
- options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
- options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
- options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
- options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
- options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
- });
- }
- ///
- /// 配置虚拟文件系统
- ///
- ///
- private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded();
- });
}
}
-}
+}
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
index f041f7bb..b92e0b72 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
@@ -16,7 +16,6 @@ global using Microsoft.EntityFrameworkCore.Design;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
-global using Microsoft.OpenApi.Models;
global using Serilog;
global using Serilog.Events;
global using StackExchange.Redis;
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
index da09e1b0..2bf10a87 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
true
Lion.AbpPro.DataDictionaryManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj
index 76a26d21..1d530fd0 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application.Contracts/Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs
index 296a2517..3dd7729b 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaries/DataDictionaryAppService.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
{
[Authorize(DataDictionaryManagementPermissions.DataDictionaryManagement.Default)]
@@ -32,7 +34,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
var entities = await _dataDictionaryRepository.GetPagingListAsync(input.Filter, input.PageSize,
input.SkipCount, false);
- result.Items = ObjectMapper.Map, List>(entities);
+ result.Items = entities.Adapt>();
return result;
}
@@ -64,7 +66,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
return new PagedResultDto(
entity.Details.Count,
- ObjectMapper.Map, List>(details));
+ details.Adapt>());
}
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs
deleted file mode 100644
index a483beea..00000000
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationAutoMapperProfile.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace Lion.AbpPro.DataDictionaryManagement
-{
- public class DataDictionaryManagementApplicationAutoMapperProfile : Profile
- {
- public DataDictionaryManagementApplicationAutoMapperProfile()
- {
- /* You can configure your AutoMapper mapping configuration here.
- * Alternatively, you can split your mapping configurations
- * into multiple profile classes for a better organization. */
- CreateMap();
- CreateMap();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs
index 4b820e8a..60383215 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/DataDictionaryManagementApplicationModule.cs
@@ -3,18 +3,9 @@ namespace Lion.AbpPro.DataDictionaryManagement
[DependsOn(
typeof(DataDictionaryManagementDomainModule),
typeof(DataDictionaryManagementApplicationContractsModule),
- typeof(AbpDddApplicationModule),
- typeof(AbpAutoMapperModule)
+ typeof(AbpDddApplicationModule)
)]
public class DataDictionaryManagementApplicationModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- context.Services.AddAutoMapperObjectMapper();
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
- }
}
}
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs
index 4a85ac94..71d0a31c 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/GlobalUsings.cs
@@ -4,7 +4,6 @@ global using System.Collections.Generic;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dto;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dtos;
@@ -16,5 +15,4 @@ global using Microsoft.Extensions.DependencyInjection;
global using Volo.Abp.Application;
global using Volo.Abp.Application.Dtos;
global using Volo.Abp.Application.Services;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.Modularity;
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj
index 88a2336f..0b0af5e5 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Application/Lion.AbpPro.DataDictionaryManagement.Application.csproj
@@ -1,12 +1,11 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
-
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj
index 8909b79c..811fa423 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
true
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
index 7e38195b..49550a7b 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaries/DataDictionaryManager.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
{
public class DataDictionaryManager : DataDictionaryDomainService, IDataDictionaryManager
@@ -31,7 +33,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
true,
cancellationToken
);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
},
token: cancellationToken
);
@@ -54,7 +56,7 @@ namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
true,
cancellationToken
);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
},
token: cancellationToken
);
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs
deleted file mode 100644
index 4045395b..00000000
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainAutoMapperProfile.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Lion.AbpPro.DataDictionaryManagement
-{
- public class DataDictionaryDomainAutoMapperProfile : Profile
- {
- public DataDictionaryDomainAutoMapperProfile()
- {
- CreateMap();
- CreateMap();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs
index a23d3d5d..5e83f3e3 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryDomainService.cs
@@ -15,15 +15,6 @@ namespace Lion.AbpPro.DataDictionaryManagement
///
protected IDistributedEventBus DistributedEventBus =>
LazyServiceProvider.LazyGetRequiredService();
-
- ///
- /// 对象映射器
- ///
- protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService(
- provider =>
- ObjectMapperContext == null
- ? provider.GetRequiredService()
- : (IObjectMapper)provider.GetRequiredService(
- typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext)));
+
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs
index 0204a66b..13762b70 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/DataDictionaryManagementDomainModule.cs
@@ -1,22 +1,11 @@
-using Volo.Abp.AutoMapper;
-
namespace Lion.AbpPro.DataDictionaryManagement
{
[DependsOn(
typeof(AbpDddDomainModule),
typeof(DataDictionaryManagementDomainSharedModule),
- typeof(AbpCachingModule),
- typeof(AbpAutoMapperModule)
+ typeof(AbpCachingModule)
)]
public class DataDictionaryManagementDomainModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- context.Services.AddAutoMapperObjectMapper();
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
- }
}
}
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs
index 028a1074..0607bf16 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/GlobalUsings.cs
@@ -6,7 +6,6 @@ global using System.ComponentModel.DataAnnotations;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dto;
global using Lion.AbpPro.Core;
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj
index 8160cbb6..a914f1b9 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain/Lion.AbpPro.DataDictionaryManagement.Domain.csproj
@@ -1,14 +1,13 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
-
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj
index 4bb09321..0cd2671b 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj
index 6da8806b..31b95e6b 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client/Lion.AbpPro.DataDictionaryManagement.HttpApi.Client.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs
index d8dde3a4..d7a648eb 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/DataDictionaries/DataDictionaryController.cs
@@ -1,3 +1,9 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Swashbuckle.AspNetCore.Annotations;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.DataDictionaryManagement.DataDictionaries
{
[Route("DataDictionary")]
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs
index b8e60a5a..16fb5699 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/GlobalUsings.cs
@@ -3,6 +3,3 @@
global using System.Threading.Tasks;
global using Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Dtos;
global using Lion.AbpPro.Core;
-global using Microsoft.AspNetCore.Mvc;
-global using Swashbuckle.AspNetCore.Annotations;
-global using Volo.Abp.Application.Dtos;
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj
index 344f7508..52342185 100644
--- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.HttpApi/Lion.AbpPro.DataDictionaryManagement.HttpApi.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj
index 3a2c0364..ce049a91 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Application.Tests/Lion.AbpPro.DataDictionaryManagement.Application.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
false
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs
index b997c920..04724471 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/DataDictionaryManagementDomainTestModule.cs
@@ -9,12 +9,5 @@ namespace Lion.AbpPro.DataDictionaryManagement
)]
public class DataDictionaryManagementDomainTestModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
- }
}
}
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs
index 96a6aceb..ac0ae9ff 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/GlobalUsings.cs
@@ -5,6 +5,5 @@ global using System.Linq;
global using System.Threading.Tasks;
global using Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore;
global using Shouldly;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.Modularity;
global using Xunit;
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj
index 5582fdfe..1b70d575 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.Domain.Tests/Lion.AbpPro.DataDictionaryManagement.Domain.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
false
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj
index 750681df..a7b8d176 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests/Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
false
diff --git a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj
index cf755b88..fe5bf094 100644
--- a/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/test/Lion.AbpPro.DataDictionaryManagement.TestBase/Lion.AbpPro.DataDictionaryManagement.TestBase.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.DataDictionaryManagement
false
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
index ee88f312..eb442d6b 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
@@ -15,178 +15,41 @@ namespace Lion.AbpPro.FileManagement;
)]
public class FileManagementHttpApiHostModule : AbpModule
{
- private const string DefaultCorsPolicyName = "Default";
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
- ConfigureVirtualFileSystem();
- ConfigureSwaggerServices(context);
- ConfigAntiForgery();
- ConfigureLocalization();
- ConfigureCache(context);
- ConfigureCors(context);
- ConfigDB();
+ context.Services
+ .AddAbpProAuditLog()
+ .AddAbpProAuthentication()
+ .AddAbpProMultiTenancy()
+ .AddAbpProHealthChecks()
+ .AddAbpProTenantResolvers()
+ .AddAbpProLocalization()
+ .AddAbpProExceptions()
+ .AddAbpProSwagger("FileManagement");
+ Configure(options => { options.UseMySQL(); });
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
- var env = context.GetEnvironment();
- app.UseHttpsRedirection();
+
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
- app.UseCors(DefaultCorsPolicyName);
+ app.UseCors();
app.UseAuthentication();
+ app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
- options.SwaggerEndpoint("/swagger/v1/swagger.json", "FileManagement API");
+ options.SwaggerEndpoint("/swagger/FileManagement/swagger.json", "FileManagement API");
options.DocExpansion(DocExpansion.None);
- options.DefaultModelExpandDepth(-2);
+ options.DefaultModelsExpandDepth(-1);
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
-
- ///
- /// 配置虚拟文件系统
- ///
- private void ConfigureVirtualFileSystem()
- {
- Configure(options => { options.FileSets.AddEmbedded(); });
- }
-
- ///
- /// 配置SwaggerUI
- ///
- ///
- private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
- {
- context.Services.AddSwaggerGen(
- options =>
- {
- options.SwaggerDoc("v1", new OpenApiInfo { Title = "FileManagement API", Version = "v1" });
- options.DocInclusionPredicate((docName, description) => true);
-
-
-
-
- #region 多语言
-
- options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme
- {
- Type = SecuritySchemeType.ApiKey,
- In = ParameterLocation.Header,
- Name = "Accept-Language",
- Description = "多语言"
- });
-
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
- },
- new string[] { }
- }
- });
-
- #endregion
- });
- }
-
- private void ConfigAntiForgery()
- {
- Configure(options => { options.AutoValidate = false; });
- }
- private void ConfigDB()
- {
- Configure(options =>
- {
- /* The main point to change your DBMS.
- * See also OperationsMigrationsDbContextFactory for EF Core tooling. */
- options.UseMySQL();
- });
- }
-
-
- ///
- /// 配置本地化
- ///
- private void ConfigureLocalization()
- {
- Configure(options =>
- {
- options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
- options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
- options.Languages.Add(new LanguageInfo("en", "en", "English"));
- options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
- options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
- options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
- options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
- options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
- options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
- options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
- options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
- options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
- options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
- options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
- options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
- options.Languages.Add(new LanguageInfo("es", "es", "Español"));
- });
- }
-
- ///
- /// Redis缓存
- ///
- ///
- private void ConfigureCache(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.KeyPrefix = "FileManagement:";
- options.GlobalCacheEntryOptions = new DistributedCacheEntryOptions
- {
- // 全局缓存有效时间
- AbsoluteExpiration = DateTimeOffset.UtcNow.AddHours(2)
- };
- });
-
- var configuration = context.Services.GetConfiguration();
- var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
- context.Services
- .AddDataProtection()
- .PersistKeysToStackExchangeRedis(redis, "YH.Wms.Operations-Keys");
- }
-
- ///
- /// 配置跨域
- ///
- private void ConfigureCors(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- context.Services.AddCors(options =>
- {
- options.AddPolicy(DefaultCorsPolicyName, builder =>
- {
- builder
- .WithOrigins(
- configuration["App:CorsOrigins"]
- .Split(",", StringSplitOptions.RemoveEmptyEntries)
- .Select(o => o.RemovePostFix("/"))
- .ToArray()
- )
- .WithAbpExposedHeaders()
- .SetIsOriginAllowedToAllowWildcardSubdomains()
- .AllowAnyHeader()
- .AllowAnyMethod()
- .AllowCredentials();
- });
- });
- }
}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
index 7aa527c8..98451e35 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
@@ -15,7 +15,6 @@ global using Microsoft.Extensions.Caching.Distributed;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
-global using Microsoft.OpenApi.Models;
global using Serilog;
global using StackExchange.Redis;
global using Swashbuckle.AspNetCore.SwaggerUI;
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
index a41965bd..74bb5f6c 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
@@ -2,10 +2,11 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
true
Lion.AbpPro.FileManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj
index 766bc2ac..d4e14b2b 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application.Contracts/Lion.AbpPro.FileManagement.Application.Contracts.csproj
@@ -2,8 +2,9 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs
deleted file mode 100644
index b617b2d5..00000000
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationAutoMapperProfile.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Lion.AbpPro.FileManagement.Files;
-
-namespace Lion.AbpPro.FileManagement;
-
-public class FileManagementApplicationAutoMapperProfile : Profile
-{
- public FileManagementApplicationAutoMapperProfile()
- {
- CreateMap();
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs
index 7a7d83b2..026bb8e9 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/FileManagementApplicationModule.cs
@@ -3,14 +3,8 @@ namespace Lion.AbpPro.FileManagement;
[DependsOn(
typeof(FileManagementDomainModule),
typeof(FileManagementApplicationContractsModule),
- typeof(AbpDddApplicationModule),
- typeof(AbpAutoMapperModule)
+ typeof(AbpDddApplicationModule)
)]
public class FileManagementApplicationModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- context.Services.AddAutoMapperObjectMapper();
- Configure(options => { options.AddMaps(true); });
- }
}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs
index ec3829d4..fad62937 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Files/FileAppService.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.FileManagement.Files;
///
@@ -27,7 +29,7 @@ public class FileAppService : ApplicationService, IFileAppService
result.TotalCount = totalCount;
if (totalCount <= 0) return result;
var list = await _fileObjectManager.GetListAsync(input.FileName, input.StartCreationTime, input.EndCreationTime, input.PageSize, input.SkipCount);
- result.Items = ObjectMapper.Map, List>(list);
+ result.Items = list.Adapt>();
return result;
}
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs
index 086045cb..167cec46 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/GlobalUsings.cs
@@ -2,7 +2,6 @@
global using System.Collections.Generic;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.FileManagement.Localization;
global using Lion.AbpPro.FileManagement.Permissions;
global using Microsoft.AspNetCore.Authorization;
@@ -12,7 +11,6 @@ global using Microsoft.Extensions.DependencyInjection;
global using Volo.Abp.Application;
global using Volo.Abp.Application.Dtos;
global using Volo.Abp.Application.Services;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.BlobStoring;
global using Volo.Abp.Content;
global using Volo.Abp.Modularity;
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj
index b9a9a855..68034f97 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Application/Lion.AbpPro.FileManagement.Application.csproj
@@ -2,13 +2,13 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
+ NU1903;NU1902;$(NoWarnNuGet)
-
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj
index 76f1e344..0f3b7967 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/Lion.AbpPro.FileManagement.Domain.Shared.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
true
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs
deleted file mode 100644
index 52348a97..00000000
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainAutoMapperProfile.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using AutoMapper;
-using Lion.AbpPro.FileManagement.Files;
-
-namespace Lion.AbpPro.FileManagement
-{
- public class FileManagementDomainAutoMapperProfile : Profile
- {
- public FileManagementDomainAutoMapperProfile()
- {
- CreateMap();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs
index 7014ecd7..b8b7f0d2 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/FileManagementDomainModule.cs
@@ -1,17 +1,10 @@
-using Volo.Abp.AutoMapper;
-
namespace Lion.AbpPro.FileManagement;
[DependsOn(
typeof(AbpDddDomainModule),
- typeof(AbpAutoMapperModule),
typeof(FileManagementDomainSharedModule),
typeof(AbpBlobStoringModule)
)]
public class FileManagementDomainModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options => { options.AddMaps(); });
- }
}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs
index 5e6618e5..8db6cade 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Files/FileObjectManager.cs
@@ -1,26 +1,24 @@
-using Volo.Abp.ObjectMapping;
+using Mapster;
namespace Lion.AbpPro.FileManagement.Files;
public class FileObjectManager : DomainService
{
private readonly IFileObjectRepository _fileObjectRepository;
- private readonly IObjectMapper _objectMapper;
+
private readonly ICurrentTenant _currentTenant;
public FileObjectManager(IFileObjectRepository fileObjectRepository,
- IObjectMapper objectMapper,
ICurrentTenant currentTenant)
{
_fileObjectRepository = fileObjectRepository;
- _objectMapper = objectMapper;
_currentTenant = currentTenant;
}
public async Task> GetListAsync(string fileName, DateTime? startDateTime = null, DateTime? endDateTime = null, int maxResultCount = 10, int skipCount = 0)
{
var list = await _fileObjectRepository.GetListAsync(fileName, startDateTime, endDateTime, maxResultCount, skipCount);
- return _objectMapper.Map, List>(list);
+ return list.Adapt>();
}
public async Task GetCountAsync(string fileName, DateTime? startDateTime = null, DateTime? endDateTime = null)
@@ -56,8 +54,7 @@ public class FileObjectManager : DomainService
entity = new FileObject(id, fileName, fileSize, contentType, CurrentTenant?.Id);
await _fileObjectRepository.InsertAsync(entity);
}
-
- return _objectMapper.Map(entity);
+ return entity.Adapt();
}
@@ -78,6 +75,6 @@ public class FileObjectManager : DomainService
{
var entity = await _fileObjectRepository.FindAsync(id);
if (entity == null) throw new DomainFileManagementException(FileManagementErrorCodes.FileNotFound);
- return _objectMapper.Map(entity);
+ return entity.Adapt();
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj
index 01d0ecf7..e7806b5f 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain/Lion.AbpPro.FileManagement.Domain.csproj
@@ -2,13 +2,12 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
-
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj
index 856f4155..c016a717 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.EntityFrameworkCore/Lion.AbpPro.FileManagement.EntityFrameworkCore.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj
index 31c4691b..74726c7f 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi.Client/Lion.AbpPro.FileManagement.HttpApi.Client.csproj
@@ -3,8 +3,9 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj
index 7b6ae56b..25b54b32 100644
--- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj
+++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.HttpApi/Lion.AbpPro.FileManagement.HttpApi.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj
index 023f9489..f0c4ddf6 100644
--- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj
+++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Application.Tests/Lion.AbpPro.FileManagement.Application.Tests.csproj
@@ -3,7 +3,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj
index 7a19db85..ca57e82f 100644
--- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj
+++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.Domain.Tests/Lion.AbpPro.FileManagement.Domain.Tests.csproj
@@ -3,7 +3,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj
index fffc48cc..229f8d06 100644
--- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj
+++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests/Lion.AbpPro.FileManagement.EntityFrameworkCore.Tests.csproj
@@ -3,7 +3,7 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
diff --git a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj
index 1dafcbf3..c42c8896 100644
--- a/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj
+++ b/aspnet-core/modules/FileManagement/test/Lion.AbpPro.FileManagement.TestBase/Lion.AbpPro.FileManagement.TestBase.csproj
@@ -3,8 +3,9 @@
- net9.0
+ net10.0
Lion.AbpPro.FileManagement
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
index 2752dfde..0922358b 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
@@ -16,7 +16,6 @@ global using Microsoft.EntityFrameworkCore.Design;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
-global using Microsoft.OpenApi.Models;
global using Serilog;
global using Serilog.Events;
global using StackExchange.Redis;
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
index c46e0ac6..0048866e 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
@@ -1,4 +1,5 @@
using Lion.AbpPro.AspNetCore;
+using Swashbuckle.AspNetCore.SwaggerUI;
namespace Lion.AbpPro.LanguageManagement
{
@@ -16,182 +17,45 @@ namespace Lion.AbpPro.LanguageManagement
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule),
typeof(AbpProAspNetCoreModule)
- )]
+ )]
public class LanguageManagementHttpApiHostModule : AbpModule
{
- private const string DefaultCorsPolicyName = "Default";
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
- context.Services.AddAlwaysAllowAuthorization();
- ConfigureSwaggerServices(context);
- ConfigureCache(context);
- ConfigureCors(context);
- ConfigureDB();
- ConfigureLocalization();
- ConfigureVirtualFileSystem(context);
+ context.Services
+ .AddAbpProAuditLog()
+ .AddAbpProAuthentication()
+ .AddAbpProMultiTenancy()
+ .AddAbpProHealthChecks()
+ .AddAbpProTenantResolvers()
+ .AddAbpProLocalization()
+ .AddAbpProExceptions()
+ .AddAbpProSwagger("LanguageManagement");
+ Configure(options => { options.UseMySQL(); });
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
- var env = context.GetEnvironment();
-
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseErrorPage();
- app.UseHsts();
- }
- app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
- app.UseCors(DefaultCorsPolicyName);
+ app.UseCors();
app.UseAuthentication();
+ app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
- options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
-
- var configuration = context.GetConfiguration();
- options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
- options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
- options.OAuthScopes("LanguageManagement");
+ options.SwaggerEndpoint("/swagger/LanguageManagement/swagger.json", "LanguageManagement API");
+ options.DocExpansion(DocExpansion.None);
+ options.DefaultModelsExpandDepth(-1);
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
-
- ///
- /// 配置跨域
- ///
- ///
- private void ConfigureCors(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- context.Services.AddCors(options =>
- {
- options.AddPolicy(DefaultCorsPolicyName, builder =>
- {
- builder
- .WithOrigins(
- configuration["App:CorsOrigins"]
- .Split(",", StringSplitOptions.RemoveEmptyEntries)
- .Select(o => o.RemovePostFix("/"))
- .ToArray()
- )
- .WithAbpExposedHeaders()
- .SetIsOriginAllowedToAllowWildcardSubdomains()
- .AllowAnyHeader()
- .AllowAnyMethod()
- .AllowCredentials();
- });
- });
- }
-
- ///
- /// 配置SwaggerUI
- ///
- ///
- private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
- {
- context.Services.AddSwaggerGen(
- options =>
- {
- options.SwaggerDoc("v1", new OpenApiInfo {Title = "LanguageManagement API", Version = "v1"});
-
- options.DocInclusionPredicate((docName, description) => true);
-
- #region 添加token
-
- options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, new OpenApiSecurityScheme()
- {
- Description = "请输入Token",
- Name = "Authorization",
- In = ParameterLocation.Header,
- Type = SecuritySchemeType.Http,
- Scheme = JwtBearerDefaults.AuthenticationScheme,
- BearerFormat = "JWT"
- });
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- {
- Type = ReferenceType.SecurityScheme, Id = "Bearer"
- }
- },
- new List()
- }
- });
-
- #endregion
- });
- }
-
- ///
- /// Redis缓存
- ///
- ///
- private void ConfigureCache(ServiceConfigurationContext context)
- {
- var hostingEnvironment = context.Services.GetHostingEnvironment();
- var configuration = context.Services.GetConfiguration();
- Configure(options => { options.KeyPrefix = "LanguageManagement:"; });
-
- if (!hostingEnvironment.IsDevelopment())
- {
- var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
- context.Services
- .AddDataProtection()
- .PersistKeysToStackExchangeRedis(redis, "LanguageManagement-Protection-Keys");
- }
- }
-
- private void ConfigureDB()
- {
- Configure(options => { options.UseMySQL(); });
- }
-
- ///
- ///配置本地化
- ///
- private void ConfigureLocalization()
- {
- Configure(options =>
- {
- options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
- options.Languages.Add(new LanguageInfo("en", "en", "English"));
- options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
- options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
- options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
- options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
- options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
- options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
- options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
- options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
- });
- }
- ///
- /// 配置虚拟文件系统
- ///
- ///
- private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded();
- });
- }
}
-}
+}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
index b364eef6..bd4921a4 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
@@ -2,10 +2,11 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
true
Lion.AbpPro.LanguageManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
+ NU1903;NU1902;$(NoWarnNuGet)
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj
index d0bccc14..9055bcb0 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application.Contracts/Lion.AbpPro.LanguageManagement.Application.Contracts.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs
index 9918804d..67cd7935 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/GlobalUsings.cs
@@ -5,7 +5,6 @@ global using System.Globalization;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.LanguageManagement.Languages.Aggregates;
global using Lion.AbpPro.LanguageManagement.Localization;
@@ -18,7 +17,6 @@ global using Volo.Abp;
global using Volo.Abp.Application;
global using Volo.Abp.Application.Dtos;
global using Volo.Abp.Application.Services;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.Json;
global using Volo.Abp.Localization;
global using Volo.Abp.Localization.External;
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs
deleted file mode 100644
index 405f31a0..00000000
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationAutoMapperProfile.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Lion.AbpPro.LanguageManagement.Languages;
-using Lion.AbpPro.LanguageManagement.LanguageTexts;
-
-namespace Lion.AbpPro.LanguageManagement
-{
- public class LanguageManagementApplicationAutoMapperProfile : Profile
- {
- public LanguageManagementApplicationAutoMapperProfile()
- {
- CreateMap();
- CreateMap();
- CreateMap();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs
index 5ddd490b..515860dd 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/LanguageManagementApplicationModule.cs
@@ -3,18 +3,9 @@ namespace Lion.AbpPro.LanguageManagement
[DependsOn(
typeof(LanguageManagementDomainModule),
typeof(LanguageManagementApplicationContractsModule),
- typeof(AbpDddApplicationModule),
- typeof(AbpAutoMapperModule)
+ typeof(AbpDddApplicationModule)
)]
public class LanguageManagementApplicationModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- context.Services.AddAutoMapperObjectMapper();
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
- }
}
}
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs
index fe30a79c..5d1c932b 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Languages/LanguageAppService.cs
@@ -1,3 +1,5 @@
+using Mapster;
+
namespace Lion.AbpPro.LanguageManagement.Languages;
///
@@ -21,8 +23,7 @@ public class LanguageAppService : ApplicationService, ILanguageAppService
public virtual async Task> AllListAsync()
{
var languages = await _languageManager.ListAsync();
- var list = ObjectMapper.Map, List>(languages);
- return list.ToList();
+ return languages.Adapt< List>();
}
@@ -36,7 +37,7 @@ public class LanguageAppService : ApplicationService, ILanguageAppService
result.TotalCount = totalCount;
if (totalCount <= 0) return result;
var list = await _languageManager.GetListAsync(input.PageSize, input.SkipCount, input.Filter);
- result.Items = ObjectMapper.Map, List>(list);
+ result.Items = list.Adapt< List>();
return result;
}
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj
index b58adc38..8c777445 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Application/Lion.AbpPro.LanguageManagement.Application.csproj
@@ -1,12 +1,12 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
+ NU1903;NU1902;$(NoWarnNuGet)
-
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj
index 13710021..ca1c6478 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/Lion.AbpPro.LanguageManagement.Domain.Shared.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
true
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs
index 9fecf102..f3ee0a68 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/DatabaseLanguageProvider.cs
@@ -1,4 +1,5 @@
using Lion.AbpPro.LanguageManagement.Languages;
+using Mapster;
namespace Lion.AbpPro.LanguageManagement;
@@ -21,7 +22,13 @@ public class DatabaseLanguageProvider : ILanguageProvider, ITransientDependency
var result = await _distributedCache.GetOrAddAsync(LanguageListCacheItem.CalculateCacheKey(), async () =>
{
var languages = await _languageManager.ListAsync(true);
- return new LanguageListCacheItem(_objectMapper.Map, List>(languages));
+ var languageInfos = new List();
+ foreach (var language in languages)
+ {
+ var temp = new LanguageInfo(language.CultureName, language.UiCultureName, language.DisplayName);
+ languageInfos.Add(temp);
+ }
+ return new LanguageListCacheItem(languageInfos);
});
return result.Languages;
}
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs
index ae0cfe74..7a8dd263 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/GlobalUsings.cs
@@ -6,7 +6,6 @@ global using System.ComponentModel.DataAnnotations;
global using System.Linq;
global using System.Threading;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.LanguageManagement.Languages.Aggregates;
global using Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates;
@@ -15,7 +14,6 @@ global using Microsoft.Extensions.Localization;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Options;
global using Volo.Abp;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.Caching;
global using Volo.Abp.Data;
global using Volo.Abp.DependencyInjection;
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs
deleted file mode 100644
index 90a1b178..00000000
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainAutoMapperProfile.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Lion.AbpPro.LanguageManagement.Languages;
-using Lion.AbpPro.LanguageManagement.LanguageTexts;
-
-namespace Lion.AbpPro.LanguageManagement
-{
- public class LanguageManagementDomainAutoMapperProfile : Profile
- {
- public LanguageManagementDomainAutoMapperProfile()
- {
- CreateMap();
- CreateMap();
- CreateMap();
- }
- }
-}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs
index b87f9f51..fafc37ac 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainModule.cs
@@ -6,7 +6,6 @@ namespace Lion.AbpPro.LanguageManagement
typeof(AbpDddDomainModule),
typeof(LanguageManagementDomainSharedModule),
typeof(AbpCachingModule),
- typeof(AbpAutoMapperModule),
typeof(AbpSettingManagementDomainModule)
)]
public class LanguageManagementDomainModule : AbpModule
@@ -17,10 +16,6 @@ namespace Lion.AbpPro.LanguageManagement
{
options.AddDynamicResource();
});
- Configure(options =>
- {
- options.AddMaps();
- });
}
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs
index cc2b561d..3449a7bc 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageManagementDomainService.cs
@@ -17,15 +17,6 @@ namespace Lion.AbpPro.LanguageManagement
///
protected IDistributedEventBus DistributedEventBus =>
LazyServiceProvider.LazyGetRequiredService();
-
- ///
- /// 对象映射器
- ///
- protected IObjectMapper ObjectMapper => LazyServiceProvider.LazyGetService(
- provider =>
- ObjectMapperContext == null
- ? provider.GetRequiredService()
- : (IObjectMapper)provider.GetRequiredService(
- typeof(IObjectMapper<>).MakeGenericType(ObjectMapperContext)));
+
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs
index ec7588c9..faaab7cc 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/LanguageTexts/LanguageTextManager.cs
@@ -1,14 +1,14 @@
-namespace Lion.AbpPro.LanguageManagement.LanguageTexts;
+using Mapster;
+
+namespace Lion.AbpPro.LanguageManagement.LanguageTexts;
public class LanguageTextManager : LanguageManagementDomainService, ILanguageTextManager
{
private readonly ILanguageTextRepository _languageTextRepository;
- private readonly IObjectMapper _objectMapper;
- public LanguageTextManager(ILanguageTextRepository languageTextRepository, IObjectMapper objectMapper)
+ public LanguageTextManager(ILanguageTextRepository languageTextRepository)
{
_languageTextRepository = languageTextRepository;
- _objectMapper = objectMapper;
}
///
@@ -22,7 +22,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex
public virtual async Task> ListAsync(string cultureName, string resourceName, string filter = null, int maxResultCount = 10, int skipCount = 0)
{
var list = await _languageTextRepository.ListAsync(cultureName, resourceName, filter, maxResultCount, skipCount);
- return ObjectMapper.Map, List>(list);
+ return list.Adapt>();
}
///
@@ -49,7 +49,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex
entity = new LanguageText(id, cultureName, resourceName, name, value, CurrentTenant.Id);
entity = await _languageTextRepository.InsertAsync(entity);
- return _objectMapper.Map(entity);
+ return entity.Adapt();
}
@@ -74,7 +74,7 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex
entity = await _languageTextRepository.UpdateAsync(entity);
}
- return _objectMapper.Map(entity);
+ return entity.Adapt();
}
///
@@ -95,6 +95,6 @@ public class LanguageTextManager : LanguageManagementDomainService, ILanguageTex
public virtual async Task> FindAsync(string cultureName, string resourceName)
{
var languageTexts = await _languageTextRepository.FindAsync(cultureName, resourceName);
- return _objectMapper.Map, List>(languageTexts);
+ return languageTexts.Adapt>();
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs
index 80bb5c2e..bf2af450 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Languages/LanguageManager.cs
@@ -1,4 +1,6 @@
-namespace Lion.AbpPro.LanguageManagement.Languages;
+using Mapster;
+
+namespace Lion.AbpPro.LanguageManagement.Languages;
public class LanguageManager : LanguageManagementDomainService, ILanguageManager
{
@@ -24,7 +26,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager
public virtual async Task> GetListAsync(int maxResultCount = 10, int skipCount = 0, string filter = null)
{
var list = await _languageRepository.ListAsync(maxResultCount, skipCount, filter);
- return ObjectMapper.Map, List>(list);
+ return list.Adapt>();
}
///
@@ -56,7 +58,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager
entity = new Language(id, cultureName, uiCultureName, displayName, flagIcon, isEnabled, false, CurrentTenant.Id);
entity = await _languageRepository.InsertAsync(entity);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
}
///
@@ -75,7 +77,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager
if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound);
entity.Update(cultureName, uiCultureName, displayName, flagIcon, isEnabled);
entity = await _languageRepository.UpdateAsync(entity);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
}
///
@@ -95,7 +97,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager
{
var entity = await _languageRepository.FindAsync(id);
if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
}
///
@@ -105,7 +107,7 @@ public class LanguageManager : LanguageManagementDomainService, ILanguageManager
{
var entity = await _languageRepository.FindAsync(cultureName);
if (entity == null) throw new LanguageManagementDomainException(LanguageManagementErrorCodes.LanguageNotFound);
- return ObjectMapper.Map(entity);
+ return entity.Adapt();
}
///
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj
index 627318ef..d514238c 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain/Lion.AbpPro.LanguageManagement.Domain.csproj
@@ -1,14 +1,13 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
-
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj
index dccef595..8e72d5ea 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.EntityFrameworkCore/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj
index c545a274..251dea27 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi.Client/Lion.AbpPro.LanguageManagement.HttpApi.Client.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj
index f3fa8804..c2b45dd9 100644
--- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj
+++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.HttpApi/Lion.AbpPro.LanguageManagement.HttpApi.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj
index f589f38a..ea75acec 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Application.Tests/Lion.AbpPro.LanguageManagement.Application.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
false
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs
index 4efda282..2cc13c38 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/GlobalUsings.cs
@@ -5,6 +5,5 @@ global using System.Linq;
global using System.Threading.Tasks;
global using Lion.AbpPro.LanguageManagement.EntityFrameworkCore;
global using Shouldly;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.Modularity;
global using Xunit;
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs
index a085f179..31c9b7a8 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/LanguageManagementDomainTestModule.cs
@@ -9,12 +9,5 @@ namespace Lion.AbpPro.LanguageManagement
)]
public class LanguageManagementDomainTestModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.AddMaps(validate: true);
- });
- }
}
}
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj
index 37538111..843993b9 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.Domain.Tests/Lion.AbpPro.LanguageManagement.Domain.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
false
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj
index 82c0b5c6..9991ee97 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests/Lion.AbpPro.LanguageManagement.EntityFrameworkCore.Tests.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
false
diff --git a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj
index cd23cd72..b953e676 100644
--- a/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj
+++ b/aspnet-core/modules/LanguageManagement/test/Lion.AbpPro.LanguageManagement.TestBase/Lion.AbpPro.LanguageManagement.TestBase.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.LanguageManagement
false
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
index 32b202f9..ff7e2d53 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
@@ -12,7 +12,6 @@ global using Microsoft.EntityFrameworkCore.Design;
global using Microsoft.Extensions.Caching.Distributed;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.Hosting;
-global using Microsoft.OpenApi.Models;
global using Serilog;
global using StackExchange.Redis;
global using Swashbuckle.AspNetCore.SwaggerUI;
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
index 5f6be1df..5c8fe031 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
@@ -2,7 +2,7 @@
- net9.0
+ net10.0
Lion.AbpPro.NotificationManagement
true
Lion.AbpPro.NotificationManagement-c2d31439-b723-48e2-b061-5ebd7aeb6010
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
index fc341b4d..ddaf9899 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
@@ -16,176 +16,41 @@ namespace Lion.AbpPro.NotificationManagement;
)]
public class NotificationManagementHttpApiHostModule : AbpModule
{
- private const string DefaultCorsPolicyName = "Default";
-
public override void ConfigureServices(ServiceConfigurationContext context)
{
- ConfigureVirtualFileSystem();
- ConfigureSwaggerServices(context);
- ConfigAntiForgery();
- ConfigureLocalization();
- ConfigureCache(context);
- ConfigureCors(context);
- ConfigDB();
+ context.Services
+ .AddAbpProAuditLog()
+ .AddAbpProAuthentication()
+ .AddAbpProMultiTenancy()
+ .AddAbpProHealthChecks()
+ .AddAbpProTenantResolvers()
+ .AddAbpProLocalization()
+ .AddAbpProExceptions()
+ .AddAbpProSwagger("NotificationManagement");
+ Configure(options => { options.UseMySQL(); });
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
- var env = context.GetEnvironment();
+
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
- app.UseCors(DefaultCorsPolicyName);
+ app.UseCors();
app.UseAuthentication();
+ app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
- options.SwaggerEndpoint("/swagger/v1/swagger.json", "NotificationManagement API");
+ options.SwaggerEndpoint("/swagger/NotificationManagement/swagger.json", "NotificationManagement API");
options.DocExpansion(DocExpansion.None);
- options.DefaultModelExpandDepth(-2);
+ options.DefaultModelsExpandDepth(-1);
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
-
- ///
- /// 配置虚拟文件系统
- ///
- private void ConfigureVirtualFileSystem()
- {
- Configure(options => { options.FileSets.AddEmbedded(); });
- }
-
- private void ConfigDB()
- {
- Configure(options =>
- {
- /* The main point to change your DBMS.
- * See also OperationsMigrationsDbContextFactory for EF Core tooling. */
- options.UseMySQL();
- });
- }
-
-
- ///
- /// 配置SwaggerUI
- ///
- ///
- private static void ConfigureSwaggerServices(ServiceConfigurationContext context)
- {
- context.Services.AddSwaggerGen(
- options =>
- {
- options.SwaggerDoc("v1", new OpenApiInfo { Title = "NotificationManagement API", Version = "v1" });
- options.DocInclusionPredicate((docName, description) => true);
-
-
- #region 多语言
-
- options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme
- {
- Type = SecuritySchemeType.ApiKey,
- In = ParameterLocation.Header,
- Name = "Accept-Language",
- Description = "多语言"
- });
-
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
- },
- new string[] { }
- }
- });
-
- #endregion
- });
- }
-
- private void ConfigAntiForgery()
- {
- Configure(options => { options.AutoValidate = false; });
- }
-
- ///
- /// 配置本地化
- ///
- private void ConfigureLocalization()
- {
- Configure(options =>
- {
- options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
- options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
- options.Languages.Add(new LanguageInfo("en", "en", "English"));
- options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
- options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
- options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
- options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
- options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
- options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
- options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
- options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
- options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
- options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
- options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
- options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
- options.Languages.Add(new LanguageInfo("es", "es", "Español"));
- });
- }
-
- ///
- /// Redis缓存
- ///
- ///
- private void ConfigureCache(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.KeyPrefix = "NotificationManagement:";
- options.GlobalCacheEntryOptions = new DistributedCacheEntryOptions
- {
- // 全局缓存有效时间
- AbsoluteExpiration = DateTimeOffset.UtcNow.AddHours(2)
- };
- });
-
- var configuration = context.Services.GetConfiguration();
- var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
- context.Services
- .AddDataProtection()
- .PersistKeysToStackExchangeRedis(redis, "YH.Wms.Operations-Keys");
- }
-
- ///
- /// 配置跨域
- ///
- private void ConfigureCors(ServiceConfigurationContext context)
- {
- var configuration = context.Services.GetConfiguration();
- context.Services.AddCors(options =>
- {
- options.AddPolicy(DefaultCorsPolicyName, builder =>
- {
- builder
- .WithOrigins(
- configuration["App:CorsOrigins"]
- .Split(",", StringSplitOptions.RemoveEmptyEntries)
- .Select(o => o.RemovePostFix("/"))
- .ToArray()
- )
- .WithAbpExposedHeaders()
- .SetIsOriginAllowedToAllowWildcardSubdomains()
- .AllowAnyHeader()
- .AllowAnyMethod()
- .AllowCredentials();
- });
- });
- }
}
\ No newline at end of file
diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj
index b8b680f7..0460e7c0 100644
--- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj
+++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application.Contracts/Lion.AbpPro.NotificationManagement.Application.Contracts.csproj
@@ -3,7 +3,7 @@
- net9.0
+ net10.0
Lion.AbpPro.NotificationManagement
diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs
index 9351ae64..948c917b 100644
--- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs
+++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/GlobalUsings.cs
@@ -4,7 +4,6 @@ global using System;
global using System.Collections.Generic;
global using System.Linq;
global using System.Threading.Tasks;
-global using AutoMapper;
global using Lion.AbpPro.NotificationManagement.Localization;
global using Lion.AbpPro.NotificationManagement.Notifications;
global using Lion.AbpPro.NotificationManagement.Notifications.Dtos;
@@ -18,7 +17,6 @@ global using Volo.Abp.Application.Dtos;
global using Volo.Abp.Application.Services;
global using Volo.Abp.AspNetCore.SignalR;
global using Volo.Abp.Auditing;
-global using Volo.Abp.AutoMapper;
global using Volo.Abp.DependencyInjection;
global using Volo.Abp.EventBus;
global using Volo.Abp.Modularity;
diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj
index 4b36f0c4..b8414eb2 100644
--- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj
+++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/Lion.AbpPro.NotificationManagement.Application.csproj
@@ -3,14 +3,14 @@
- net9.0
+ net10.0
Lion.AbpPro.NotificationManagement
+ NU1903;
-
diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs
deleted file mode 100644
index 7eea8871..00000000
--- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Application/NotificationManagementApplicationAutoMapperProfile.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace Lion.AbpPro.NotificationManagement
-{
- public class NotificationManagementApplicationAutoMapperProfile : Profile
- {
- public NotificationManagementApplicationAutoMapperProfile()
- {
- /* You can configure your AutoMapper mapping configuration here.
- * Alternatively, you can split your mapping configurations
- * into multiple profile classes for a better organization. */
- CreateMap();
- CreateMap