perf: 优化全部模块程序集
This commit is contained in:
@@ -2,6 +2,7 @@ using AspNetCore.Microsoft.AspNetCore.Hosting;
|
||||
using Yi.Framework.Core.Autofac.Extensions;
|
||||
using Yi.Framework.Core.Autofac.Modules;
|
||||
using Yi.Framework.Core.Extensions;
|
||||
using Yi.Framework.Core.Module;
|
||||
using Yi.Template.Application;
|
||||
using Yi.Template.Web;
|
||||
|
||||
@@ -15,7 +16,7 @@ builder.UseYiModules(typeof(YiTemplateWebModule));
|
||||
//添加autofac模块,需要添加模块
|
||||
builder.Host.ConfigureAutoFacContainer(container =>
|
||||
{
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiTemplateApplicationModule).Assembly);
|
||||
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, ModuleAssembly.Assemblies);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@@ -5,6 +5,7 @@ using Yi.Framework.Auth.JwtBearer;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.Core.Attributes;
|
||||
using Yi.Framework.Core.Autofac;
|
||||
using Yi.Framework.Core.Module;
|
||||
using Yi.Framework.Data.Json;
|
||||
using Yi.Template.Application;
|
||||
using Yi.Template.Sqlsugar;
|
||||
@@ -28,7 +29,7 @@ namespace Yi.Template.Web
|
||||
services.AddAutoApiService(opt =>
|
||||
{
|
||||
//NETServiceTest所在程序集添加进动态api配置
|
||||
opt.CreateConventional(typeof(YiTemplateApplicationModule).Assembly, option => option.RootPath = string.Empty);
|
||||
opt.CreateConventional(ModuleAssembly.Assemblies, option => option.RootPath = string.Empty);
|
||||
});
|
||||
|
||||
//添加swagger
|
||||
|
||||
Reference in New Issue
Block a user