Files
Web_BLSKafka_Server_Prod/BLWLogProduce/Program.cs
2025-11-21 08:48:01 +08:00

33 lines
718 B
C#

using BLWLogProduce.Services;
namespace BLWLogProduce
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
builder.Services.AddHostedService<KafkaProduce>();
builder.Services.AddHostedService<MyTimer>();
builder.Services.AddMemoryCache();
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
}
}
}