From 54cefea3fe69bf1d42c6114b68c9a2024c411c6f Mon Sep 17 00:00:00 2001 From: zyf <1071160500@qq.com> Date: 星期二, 20 八月 2024 17:13:31 +0800 Subject: [PATCH] 生产订单新增字段ScrapRate 变动损耗率 --- MESApplication/Startup.cs | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/MESApplication/Startup.cs b/MESApplication/Startup.cs index 17e9bf6..0b7bc42 100644 --- a/MESApplication/Startup.cs +++ b/MESApplication/Startup.cs @@ -1,4 +1,5 @@ -锘縰sing MES.Service.Dto.@base; +锘縰sing System.Reflection; +using MES.Service.Dto.@base; using MES.Service.util; using Microsoft.OpenApi.Models; using Newtonsoft.Json; @@ -35,6 +36,10 @@ c.SwaggerDoc("v1", new OpenApiInfo { Title = "MESApplication.Api", Version = "v1" }); + var xmlFile = + $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; + var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); + c.IncludeXmlComments(xmlPath, true); }); //閰嶇疆JSON.NET @@ -68,11 +73,15 @@ }); #region 鎺ュ彛琛屽姩杩囨护鍣� - services.AddControllers(options => { + + services.AddControllers(options => + { options.Filters.Add(new ActionFilter()); }); var serviceProvider = services.BuildServiceProvider(); - ActionFilter.LoggerError = serviceProvider.GetRequiredService<ILogger<ActionFilter>>(); + ActionFilter.LoggerError = + serviceProvider.GetRequiredService<ILogger<ActionFilter>>(); + #endregion } @@ -104,6 +113,5 @@ ////////////////////////// /////////////////////////// - } } \ No newline at end of file -- Gitblit v1.9.3