feat: 同步
This commit is contained in:
@@ -23,7 +23,8 @@ public class Startup : AppStartup
|
||||
|
||||
services.AddCorsAccessor();
|
||||
|
||||
services.AddControllers().AddInjectWithUnifyResult().AddJsonOptions(x => {
|
||||
services.AddControllers().AddInjectWithUnifyResult().AddJsonOptions(x =>
|
||||
{
|
||||
x.JsonSerializerOptions.Converters.Add(new DateTimeJsonConverter("yyyy-MM-dd HH:mm:ss"));
|
||||
x.JsonSerializerOptions.Converters.Add(new LongToStringConverter());
|
||||
});
|
||||
@@ -37,7 +38,7 @@ public class Startup : AppStartup
|
||||
{
|
||||
// 注册作业,并配置作业触发器
|
||||
//options.AddJob<TestJob>(Triggers.Period(10000));
|
||||
options.AddJob<SystemDataJob>(Triggers.Cron("0 0 0,12 ? * ?",CronStringFormat.WithSeconds)); // 表示每天凌晨与12点
|
||||
options.AddJob<SystemDataJob>(Triggers.Cron("0 0 0,12 ? * ?", CronStringFormat.WithSeconds)); // 表示每天凌晨与12点
|
||||
});
|
||||
services.AddFileLogging("log/application-{0:yyyy}-{0:MM}-{0:dd}.log", options =>
|
||||
{
|
||||
@@ -52,6 +53,8 @@ public class Startup : AppStartup
|
||||
});
|
||||
|
||||
services.AddMonitorLogging();
|
||||
|
||||
services.AddHealthChecks();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
@@ -60,7 +63,7 @@ public class Startup : AppStartup
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseHealthChecks();
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseRouting();
|
||||
@@ -71,7 +74,7 @@ public class Startup : AppStartup
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseInject(string.Empty);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user