2023-01-17 22:47:15 +08:00
|
|
|
|
using AspNetCore.Microsoft.AspNetCore.Hosting;
|
2023-01-16 20:55:36 +08:00
|
|
|
|
using Yi.Framework.Core.Autofac.Extensions;
|
|
|
|
|
|
using Yi.Framework.Core.Autofac.Modules;
|
2023-01-14 18:16:16 +08:00
|
|
|
|
using Yi.Framework.Core.Extensions;
|
2023-01-11 15:05:31 +08:00
|
|
|
|
using Yi.Framework.Web;
|
2023-01-11 11:10:59 +08:00
|
|
|
|
|
2023-01-16 21:10:00 +08:00
|
|
|
|
TimeTest.Start();
|
2023-01-11 11:10:59 +08:00
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
2023-01-17 22:47:15 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
|
2023-01-17 23:33:14 +08:00
|
|
|
|
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
2023-01-14 18:16:16 +08:00
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
2023-01-17 17:50:15 +08:00
|
|
|
|
builder.UseYiModules(typeof(YiFrameworkWebModule));
|
2023-01-16 20:55:36 +08:00
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>autofacģ<63><C4A3>,<2C><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
|
|
|
|
|
builder.Host.ConfigureAutoFacContainer(container =>
|
|
|
|
|
|
{
|
|
|
|
|
|
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiFrameworkWebModule).Assembly);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2023-01-11 11:10:59 +08:00
|
|
|
|
var app = builder.Build();
|
2023-01-16 20:55:36 +08:00
|
|
|
|
|
|
|
|
|
|
var t = app.Services.GetService<Test2Entity>();
|
2023-01-17 22:47:15 +08:00
|
|
|
|
|
|
|
|
|
|
//ȫ<>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
app.UseErrorHandlingServer();
|
2023-01-14 18:16:16 +08:00
|
|
|
|
app.MapControllers();
|
2023-01-17 22:47:15 +08:00
|
|
|
|
|
2023-01-14 18:16:16 +08:00
|
|
|
|
app.Run();
|