|
|
|
@ -20,9 +20,10 @@
|
|
|
|
|
//老版本写法
|
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
|
|
|
{
|
|
|
|
|
app.Map("/",async context =>
|
|
|
|
|
//默认打开Swagger
|
|
|
|
|
endpoints.Map("/", async context =>
|
|
|
|
|
{
|
|
|
|
|
context.Response.Redirect("swagger/index.html");
|
|
|
|
|
context.Response.Redirect($"{context.Request.PathBase}/swagger/index.html");
|
|
|
|
|
await Task.CompletedTask;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|