From 72c0f86c75c8a9a5eb7435d72b6ebece4c5382e8 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 14 四月 2026 18:21:27 +0800
Subject: [PATCH] feat: 添加vue3-json-viewer并优化日志显示
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
index d1ac9d1..c6cac5f 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/AutoMapperSetup.cs
@@ -1,16 +1,22 @@
-锘縩amespace WIDESEAWCS_WCSServer.Filter
+锘縰sing Mapster;
+using MapsterMapper;
+
+namespace WIDESEAWCS_WCSServer.Filter
{
/// <summary>
- /// Automapper 鍚姩鏈嶅姟
+ /// Mapster 鍚姩鏈嶅姟
/// </summary>
- public static class AutoMapperSetup
+ public static class MapsterSetup
{
- public static void AddAutoMapperSetup(this IServiceCollection services)
+ public static void AddMapsterSetup(this IServiceCollection services)
{
if (services == null) throw new ArgumentNullException(nameof(services));
- services.AddAutoMapper(typeof(AutoMapperConfig));
- AutoMapperConfig.RegisterMappings();
+ TypeAdapterConfig typeAdapterConfig = new TypeAdapterConfig();
+ MapsterConfig.RegisterMappings(typeAdapterConfig);
+
+ services.AddSingleton(typeAdapterConfig);
+ services.AddScoped<IMapper, ServiceMapper>();
}
}
}
--
Gitblit v1.9.3