|
|
@ -1,5 +1,5 @@
|
|
|
|
using Ds.WMS.WebCore;
|
|
|
|
using Ds.WMS.WebCore.appextend;
|
|
|
|
using DS.Module.Swagger;
|
|
|
|
using Ds.WMS.WebCore.appstartup;
|
|
|
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args).UseMyConfiguration();
|
|
|
|
var builder = WebApplication.CreateBuilder(args).UseMyConfiguration();
|
|
|
|
|
|
|
|
|
|
|
@ -15,22 +15,7 @@ builder.Services.AddControllers(options =>
|
|
|
|
builder.UseDynamicStartups();
|
|
|
|
builder.UseDynamicStartups();
|
|
|
|
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
// 中间件
|
|
|
|
|
|
|
|
app.UseMyMiddlewares();
|
|
|
|
|
|
|
|
|
|
|
|
app.UseMiddleware<RequestLoggingMiddleware>();
|
|
|
|
|
|
|
|
app.UseMiddleware<GlobalExceptionHandler>();
|
|
|
|
|
|
|
|
// 启用中间件服务生成 Swagger 作为 JSON 终结点
|
|
|
|
|
|
|
|
app.UseSwagger();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 启用中间件服务对 swagger-ui,指定 Swagger JSON 终结点
|
|
|
|
|
|
|
|
app.UseSwaggerDocumentation();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.UseRouting();
|
|
|
|
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
endpoints.MapControllers();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// 顺序放在最后即可
|
|
|
|
|
|
|
|
app.UseDynamicStartups();
|
|
|
|
|
|
|
|
app.Run();
|
|
|
|
app.Run();
|