feat: 完成配置模块

This commit is contained in:
橙子
2024-06-28 00:14:15 +08:00
parent 1843b9c44f
commit 426c67631a
6 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using Mapster;
using System.Xml.Linq;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.RateLimiting;
using Volo.Abp.Application.Services;
@@ -155,7 +156,9 @@ namespace Yi.Abp.Application.Services
var enableOrNull2 = await _settingManager.GetOrNullGlobalAsync("DDD");
//当然,他的独特地方,是支持来自多个模块,例如配置文件?
var result= await _settingManager.GetOrNullConfigurationAsync("Test");
var result = await _settingManager.GetOrNullConfigurationAsync("Test");
return result ?? string.Empty;
}

View File

@@ -13,7 +13,7 @@ namespace Yi.Abp.Domain.Shared.Settings
{
context.Add(
new SettingDefinition("DDD","127.0.0.1"),
new SettingDefinition("TTT", "127.0.0.1")
new SettingDefinition("Test", null)
);

View File

@@ -15,6 +15,7 @@
"Settings": {
"Test": "hello"
},
//数据库类型列表
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],