feat: 完成配置模块
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Net.Http;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
@@ -8,11 +9,13 @@ using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public class ApiInfoMiddleware : IMiddleware, ITransientDependency
|
||||
{
|
||||
|
||||
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
|
||||
{
|
||||
context.Response.OnStarting(() =>
|
||||
context.Response.OnStarting([DebuggerStepThrough] () =>
|
||||
{
|
||||
if (context.Response.StatusCode == StatusCodes.Status200OK
|
||||
&& context.Response.Headers["Content-Type"].ToString() == "application/vnd.ms-excel")
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -14,6 +15,7 @@ using Yi.Framework.Rbac.Domain.Shared.Consts;
|
||||
|
||||
namespace Yi.Framework.Rbac.Domain.Authorization
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public class RefreshTokenMiddleware : IMiddleware, ITransientDependency
|
||||
{
|
||||
private AccountManager _accountManager;
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.SettingManagement;
|
||||
using Volo.Abp.Timing;
|
||||
using Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Application;
|
||||
|
||||
[DependsOn(
|
||||
typeof(AbpDddApplicationModule),
|
||||
typeof(AbpSettingManagementApplicationContractsModule),
|
||||
typeof(YiFrameworkSettingManagementDomainModule),
|
||||
typeof(AbpTimingModule)
|
||||
|
||||
)]
|
||||
public class YiFrameworkSettingManagementApplicationModule : AbpModule
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"Settings": {
|
||||
"Test": "hello"
|
||||
},
|
||||
|
||||
//数据库类型列表
|
||||
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user