Program.cs 678 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using DFS.Core.Mvc;
  2. using Fuel.PaymentServer.MicServer;
  3. var builder = WebApplication.CreateBuilder(args);
  4. // Add services to the container.
  5. //³õʼ»¯DFS Server
  6. builder.Services.AddMicService(builder.Environment);
  7. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
  8. builder.Services.AddEndpointsApiExplorer();
  9. builder.Services.AddSwaggerGen();
  10. var app = builder.Build();
  11. // Configure the HTTP request pipeline.
  12. if (app.Environment.IsDevelopment())
  13. {
  14. app.UseSwagger();
  15. app.UseSwaggerUI();
  16. }
  17. app.UseDFSServer();
  18. app.UseHttpsRedirection();
  19. app.UseAuthentication();
  20. app.UseAuthorization();
  21. app.MapControllers();
  22. app.Run();