| | |
| | | builder.Services.AddAllOptionRegister();//读取配置文件 |
| | | builder.Services.AddMemoryCacheSetup();//缓存 |
| | | builder.Services.AddSqlsugarSetup();//SqlSugar 启动服务 |
| | | //builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 |
| | | builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入 |
| | | builder.Services.AddDbSetup();//Db 启动服务 |
| | | |
| | | //builder.Services.AddScoped<QuartzJobCreateDataTabel>(); |
| | | //builder.Services.AddHostedService<QuartzJobDataTableHostedService>(); |
| | | builder.Services.AddScoped<QuartzJobCreateDataTabel>(); |
| | | builder.Services.AddHostedService<QuartzJobDataTableHostedService>(); |
| | | |
| | | //todo 初始化模型验证配置 |
| | | //builder.Services.UseMethodsModelParameters().UseMethodsGeneralParameters(); |
| | |
| | | |
| | | builder.Services.AddSwaggerSetup(); |
| | | |
| | | //builder.Services.AddJobSetup();//任务调度 启动服务 |
| | | builder.Services.AddJobSetup();//任务调度 启动服务 |
| | | |
| | | builder.Services.AddHttpContextSetup(); |
| | | |
| | | //builder.Services.AddHostedService<QuartzJobHostedService>(); |
| | | builder.Services.AddHostedService<QuartzJobHostedService>(); |
| | | |
| | | //todo |
| | | builder.Services.AddMvc(options => |
| | | { |
| | | options.Filters.Add(typeof(ApiAuthorizeFilter)); |
| | | //options.Filters.Add(typeof(ActionExecuteFilter)); |
| | | // options.SuppressAsyncSuffixInActionNames = false; |
| | | }); |
| | | |
| | | builder.Services.AddAuthorizationSetup(); |
| | |
| | | |
| | | app.UseRouting(); |
| | | |
| | | |
| | | app.UseAuthentication(); |
| | | app.UseAuthorization(); |
| | | |
| | | |
| | | |
| | | app.MapControllers(); |
| | | |