@ -18,16 +18,17 @@
//或者MapGet方法
//老版本写法
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");
```
+ 路由+自定义内容
```csharp