feat:生成环境才启用定时任务

This commit is contained in:
不做码农 2023-07-09 09:33:53 +08:00
parent 7694899ac1
commit 9ab3a57b08

View File

@ -121,8 +121,11 @@ app.UseAuthorization();
//开启缓存
app.UseResponseCaching();
if (builder.Environment.IsProduction())
{
//恢复/启动任务
app.UseAddTaskSchedulers();
}
//使用swagger
app.UseSwagger();
//启用客户端IP限制速率