From 2e4f18da967e270490a2d26c888e5c3e083c39fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=9B=8B=E8=9B=8B?= Date: Fri, 10 Jun 2022 05:40:13 +0000 Subject: [PATCH] =?UTF-8?q?update=20=20ObjectMapperServiceCollectionExtens?= =?UTF-8?q?ions.cs.=20Mapster=20=E6=B7=BB=E5=8A=A0=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BF=BD=E7=95=A5=E5=A4=A7=E5=B0=8F=E5=86=99?= =?UTF-8?q?=E6=95=8F=E6=84=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extensions/ObjectMapperServiceCollectionExtensions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/Furion.Extras.ObjectMapper.Mapster/Extensions/ObjectMapperServiceCollectionExtensions.cs b/framework/Furion.Extras.ObjectMapper.Mapster/Extensions/ObjectMapperServiceCollectionExtensions.cs index 8dfc4dc0b0..f6faa4c6a4 100644 --- a/framework/Furion.Extras.ObjectMapper.Mapster/Extensions/ObjectMapperServiceCollectionExtensions.cs +++ b/framework/Furion.Extras.ObjectMapper.Mapster/Extensions/ObjectMapperServiceCollectionExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2022 百小僧, Baiqian Co.,Ltd. +// Copyright (c) 2020-2022 百小僧, Baiqian Co.,Ltd. // Furion is licensed under Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan PSL v2. // You may obtain a copy of Mulan PSL v2 at: @@ -35,6 +35,11 @@ public static class ObjectMapperServiceCollectionExtensions config.Default .NameMatchingStrategy(NameMatchingStrategy.Flexible) .PreserveReference(true); + + // 配置默认全局映射(忽略大小写敏感) + config.Default + .NameMatchingStrategy(NameMatchingStrategy.IgnoreCase) + .PreserveReference(true); // 配置支持依赖注入 services.AddSingleton(config); -- Gitee