中间件很讲究顺序,app.UseSwagger() 与 app.UseSwaggerUI() 需要放在 app.UseRouting() 之前
app.UseSwagger()
app.UseSwaggerUI()
app.UseRouting()