Program.cs 903 B

123456789101112131415161718192021222324252627
  1. using Agile.Config.Client;
  2. using AspectCore.Extensions.DependencyInjection;
  3. using Microsoft.AspNetCore.Hosting;
  4. using Microsoft.Extensions.Hosting;
  5. namespace XYY.Api.Finance
  6. {
  7. public class Program
  8. {
  9. public static void Main(string[] args)
  10. {
  11. CreateHostBuilder(args).Build().Run();
  12. }
  13. public static IHostBuilder CreateHostBuilder(string[] args) =>
  14. Host.CreateDefaultBuilder(args)
  15. .ConfigureAppConfiguration((context, config) =>
  16. {
  17. //ʹÓÃAddAgileConfigÅäÖÃÒ»¸öеÄIConfigurationSource
  18. config.AddAgileConfig();
  19. })
  20. .ConfigureWebHostDefaults(webBuilder =>
  21. {
  22. webBuilder.UseStartup<Startup>();
  23. }).UseServiceProviderFactory(x => new DynamicProxyServiceProviderFactory());
  24. }
  25. }