@ -20,12 +20,13 @@
//老版本写法
app.UseEndpoints(endpoints =>
{
app.Map("/",async context =>
context.Response.Redirect("swagger/index.html");
await Task.CompletedTask;
});
//默认打开Swagger
endpoints.Map("/", async context =>
context.Response.Redirect($"{context.Request.PathBase}/swagger/index.html");
```
+ 路由+自定义内容