完成错误中间件,统一返回结果
This commit is contained in:
1
Yi.Framework.Net6/test/Yi.Framework.Web/GlobalUsings.cs
Normal file
1
Yi.Framework.Net6/test/Yi.Framework.Web/GlobalUsings.cs
Normal file
@@ -0,0 +1 @@
|
||||
global using Yi.Framework.Core.Attributes;
|
||||
@@ -1,3 +1,4 @@
|
||||
using AspNetCore.Microsoft.AspNetCore.Hosting;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
@@ -6,7 +7,8 @@ using Yi.Framework.Web;
|
||||
TimeTest.Start();
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.WebHost.UseUrls(builder.Configuration.GetValue<string>("StartUrl"));
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
|
||||
builder.WebHost.UseStartUrlsServer(builder.Configuration, "StartUrl");
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
||||
builder.UseYiModules(typeof(YiFrameworkWebModule));
|
||||
@@ -17,10 +19,12 @@ builder.Host.ConfigureAutoFacContainer(container =>
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiFrameworkWebModule).Assembly);
|
||||
});
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
var t = app.Services.GetService<Test2Entity>();
|
||||
|
||||
//ȫ<>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
app.UseErrorHandlingServer();
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.DependencyInjection;
|
||||
using Yi.Framework.Core.DependencyInjection;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
|
||||
@@ -11,3 +11,22 @@
|
||||
2023:01:17-17:45:11本次运行启动时间为:4771毫秒
|
||||
2023:01:17-17:45:54本次运行启动时间为:1917毫秒
|
||||
2023:01:17-17:48:04本次运行启动时间为:2138毫秒
|
||||
2023:01:17-17:57:41本次运行启动时间为:1907毫秒
|
||||
2023:01:17-17:58:29本次运行启动时间为:1895毫秒
|
||||
2023:01:17-17:58:43本次运行启动时间为:1937毫秒
|
||||
2023:01:17-17:59:38本次运行启动时间为:1856毫秒
|
||||
2023:01:17-21:06:57本次运行启动时间为:2285毫秒
|
||||
2023:01:17-21:09:32本次运行启动时间为:2007毫秒
|
||||
2023:01:17-21:10:16本次运行启动时间为:1862毫秒
|
||||
2023:01:17-21:12:25本次运行启动时间为:2055毫秒
|
||||
2023:01:17-21:13:46本次运行启动时间为:5606毫秒
|
||||
2023:01:17-21:14:35本次运行启动时间为:4824毫秒
|
||||
2023:01:17-21:18:17本次运行启动时间为:8985毫秒
|
||||
2023:01:17-21:19:48本次运行启动时间为:1859毫秒
|
||||
2023:01:17-21:21:32本次运行启动时间为:1786毫秒
|
||||
2023:01:17-22:41:17本次运行启动时间为:1901毫秒
|
||||
2023:01:17-22:42:21本次运行启动时间为:1946毫秒
|
||||
2023:01:17-22:42:55本次运行启动时间为:1970毫秒
|
||||
2023:01:17-22:43:56本次运行启动时间为:2023毫秒
|
||||
2023:01:17-22:45:25本次运行启动时间为:1803毫秒
|
||||
2023:01:17-22:45:52本次运行启动时间为:1877毫秒
|
||||
|
||||
@@ -7,11 +7,7 @@ using Yi.Framework.Sqlsugar;
|
||||
|
||||
namespace Yi.Framework.Web
|
||||
{
|
||||
/// <summary>
|
||||
/// 这里是最后执行的模块
|
||||
/// </summary>
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkCoreModule),
|
||||
typeof(YiFrameworkSqlsugarModule),
|
||||
typeof(YiFrameworkApplicationModule)
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user