Program.cs 873 B

12345678910111213141516171819202122232425262728
  1. using Agile.Config.Client;
  2. using AspectCore.Extensions.DependencyInjection;
  3. using Microsoft.AspNetCore.Hosting;
  4. using Microsoft.Extensions.Hosting;
  5. namespace XYY.Api.Order
  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. .ConfigureWebHostDefaults(webBuilder =>
  16. {
  17. webBuilder.UseStartup<Startup>();
  18. }).ConfigureAppConfiguration((context, config) =>
  19. {
  20. //ʹÓÃAddAgileConfigÅäÖÃÒ»¸öеÄIConfigurationSource
  21. config.AddAgileConfig();
  22. }).UseServiceProviderFactory(x => new DynamicProxyServiceProviderFactory());
  23. }
  24. }