105040 增加注释
This commit is contained in:
parent
3024bb1d62
commit
f726fa20d8
|
|
@ -253,6 +253,7 @@
|
|||
<member name="M:LFlow.Base.Program.ConfigDllLoader">
|
||||
<summary>
|
||||
配置DLL加载器
|
||||
接管DLL加载过程,处理依赖问题,从当前路径和Service文件夹中加载DLL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:LFlow.Base.Utils.ApiExplorerGroupPerVersionConvention">
|
||||
|
|
|
|||
|
|
@ -124,15 +124,6 @@ public static class Program
|
|||
.AllowAnyHeader();
|
||||
});
|
||||
});
|
||||
|
||||
//// 使用Serilog,此处为了修复 `The logger is already frozen` 的问题,重新配置Serilog
|
||||
//builder.Host.UseSerilog((context, services, config) =>
|
||||
//{
|
||||
// config.ReadFrom.Configuration(context.Configuration)
|
||||
// .ReadFrom.Services(services)
|
||||
// .Enrich.FromLogContext();
|
||||
// // .WriteTo.Console();
|
||||
//}, true);
|
||||
builder.Host.UseSerilog(Log.Logger);
|
||||
// 注册中间件
|
||||
builder.Services.RegisterMiddlewares(App.SubServiceAssembly);
|
||||
|
|
@ -236,6 +227,7 @@ public static class Program
|
|||
/// </summary>
|
||||
public static void LoadSubService(this IServiceCollection services)
|
||||
{
|
||||
//TODO: 从配置文件中读取加载路径
|
||||
var path = Path.Combine(AppContext.BaseDirectory, "Services");
|
||||
// Console.WriteLine(path);
|
||||
var files = Directory.GetFiles(path, "*.dll");
|
||||
|
|
@ -294,6 +286,7 @@ public static class Program
|
|||
|
||||
/// <summary>
|
||||
/// 配置DLL加载器
|
||||
/// 接管DLL加载过程,处理依赖问题,从当前路径和Service文件夹中加载DLL
|
||||
/// </summary>
|
||||
public static void ConfigDllLoader()
|
||||
{
|
||||
|
|
@ -301,7 +294,7 @@ public static class Program
|
|||
{
|
||||
var assemblyName = new AssemblyName(args.Name);
|
||||
|
||||
// 判断是否已经被加载
|
||||
// 判断是否已经被加载 避免重复加载
|
||||
var loadedAssembly = AppDomain.CurrentDomain.GetAssemblies()
|
||||
.FirstOrDefault(a => a.FullName == assemblyName.FullName);
|
||||
if (loadedAssembly != null)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"Urls": "http://*:8088;http://*:3453",
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Debug",
|
||||
"Default": "Information",
|
||||
"Override": {
|
||||
"Microsoft.AspNetCore.Mvc": "Debug",
|
||||
"Microsoft.AspNetCore.Routing": "Debug",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace LFlow.UserManagement
|
|||
// var progController = context.GetRouteData()?.Values["controller"]?.ToString();
|
||||
// var progAction = context.GetRouteData()?.Values["action"]?.ToString();
|
||||
// if (progAction != "ListAll")
|
||||
await next();
|
||||
await next();
|
||||
// else
|
||||
// {
|
||||
// await context.Response.WriteAsync(JsonConvert.SerializeObject(ApiResult<object>.FailResult("无权限!", 100501)));
|
||||
|
|
|
|||
Loading…
Reference in New Issue