| | |
| | | using Furion; |
| | | using Consul; |
| | | using Furion; |
| | | using Furion.EventBus; |
| | | using MediatR; |
| | | using Microsoft.AspNetCore.Builder; |
| | |
| | | { |
| | | public void ConfigureServices(IServiceCollection services) |
| | | { |
| | | services.AddHealthChecks(); |
| | | |
| | | services.AddConsoleFormatter(options => |
| | | { |
| | | options.WithTraceId = true; |
| | |
| | | }); |
| | | |
| | | services.AddConfigurableOptions<AliyunOptions>(); |
| | | |
| | | services.AddHttpRemote(); |
| | | |
| | | services.AddComponent<ConsulServiceComponent>(); |
| | | |
| | | services.AddComponent<EventBusServiceComponent>(); |
| | | |
| | |
| | | app.UseEndpoints(endpoints => |
| | | { |
| | | endpoints.MapControllers(); |
| | | endpoints.MapHealthChecks("/healthz"); |
| | | }); |
| | | |
| | | app.UseComponent<ConsulApplicationComponent>(env); |
| | | |
| | | //lifetime.ApplicationStarted.Register(async () => |
| | | //{ |
| | | // await ResourceUtils.BuildDynamicControllersAsync(); |