注意:1. 当Hangfire服务由Web程序来启用时,默认情况下,web应用程序中的Hangfire服务器实例在第一个用户访问您的站点之前不会启动.甚至,有一些事件会在一段时间后导致web应用程序关闭(比如空闲超时应用程序池回收事件).在这些情况下, "循环任务"和"延迟作业"将不会进入队列,而"进入队列的作业"将不会被处理.因此我们需要让ASP.NET应用程序始终运行.(详见官方的方法:Making ASP.NET application a
创建项目 net5就自带上了swaggerUI,见红色 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddSwaggerGen(c => { c.SwaggerDo