1、编写中间件
①方式一(中间件写在Startup.cs中)
②方式二(中间件写在独立文件中)
中间件写法:
注册到IApplicationBuilder:
在Startup中使用:
补充:NetCore的学习地址https://docs.microsoft.com/zh-cn/aspnet/core/?view=aspnetcore-6.0
作者:꧁执笔小白꧂
中间件写法:
注册到IApplicationBuilder:
在Startup中使用:
补充:NetCore的学习地址https://docs.microsoft.com/zh-cn/aspnet/core/?view=aspnetcore-6.0
作者:꧁执笔小白꧂