| | |
| | | using WIDESEA_Core.Core; |
| | | using Swashbuckle.AspNetCore.SwaggerGen; |
| | | using Microsoft.OpenApi.Models; |
| | | using WIDESEA_StorageTaskServices; |
| | | |
| | | var builder = WebApplication.CreateBuilder(args); |
| | | |
| | |
| | | } |
| | | }); |
| | | |
| | | builder.Services.AddHostedService<MyBackgroundService>(); |
| | | |
| | | |
| | | var app = builder.Build(); |
| | | |
| | |
| | | app.ConfigureApplication();//配置文件 |
| | | app.UseApplicationSetup();//启动配置 |
| | | app.UseSession(); |
| | | if (app.Environment.IsDevelopment()) |
| | | { |
| | | //if (app.Environment.IsDevelopment()) |
| | | //{ |
| | | //todo |
| | | //app.UseSwaggerAuthorized(); |
| | | app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEA_WMSServer.index.html")); |
| | | }//判断是否需要打开swagger |
| | | //}//判断是否需要打开swagger |
| | | |
| | | app.UseIpLimitMiddle(); |
| | | app.UseApiLogMiddleware(); |
| | |
| | | |
| | | app.UseAuthentication(); |
| | | app.UseAuthorization(); |
| | | |
| | | |
| | | |
| | | app.MapControllers(); |