You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB
C#

12 months ago
using Ds.Module.DynamicApi;
using Ds.Module.ResultFilter;
using GZY.Quartz.MUI.Extensions;
12 months ago
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// <20><><EFBFBD><EFBFBD>SignalR<6C><52><EFBFBD><EFBFBD>
builder.Services.AddSignalR();
builder.Services.AddControllers().AddDynamicWebApi();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddQuartzUI();
//<2F><><EFBFBD><EFBFBD>ClassJob<6F><62>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//services.AddQuartzClassJobs();
//<2F><><EFBFBD>ݿ<EFBFBD>ע<EFBFBD>ʽi
//var optionsBuilder = new DbContextOptionsBuilder();
//optionsBuilder.UseMysql("server=xxxxxxx;database=xxx;User Id=xxxx;PWD=xxxx", b => b.MaxBatchSize(1));//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
//services.AddQuartzUI(optionsBuilder.Options); //ע<><D7A2>UI<55><49><EFBFBD><EFBFBD>
12 months ago
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
//<2F><><EFBFBD><EFBFBD>SignalR<6C>˵<EFBFBD>
//endpoints.MapHub<ServerMonitorHub>("/serverMonitorHub");
//<2F><EFBFBD><ECB3A3><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
app.UseMiddleware<ExceptionHandlerMiddleware>();
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.UseQuartz();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//https://localhost:7150/quartzui
12 months ago
app.Run();