排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256


欢迎加群交流技术

方法一:使用中间件来设置
app.Use(next => async context => { if (context.Request.Path == "/") { context.Response.Redirect("/swagger"); return; } await next(context); });
方法二:自定义路由
方法三:swagger配置
方法很多种比如:
用中间件自定义路由,过滤器中跳转(直接一个重定向即可),控制器中跳转(一样直接一个重定向即可)),自定义路由都可以(起始页匹配的都是空模板,然后进行跳转即可)
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739。有需要软件开发,或者学习软件技术的朋友可以和我联系~(Q:815170684)
评价