From c97916f276a328fa70696a8582dc0c23144424f9 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期三, 06 八月 2025 16:59:32 +0800 Subject: [PATCH] feat:企业开发 --- FlexJobApi.Core/FlexJobApiCoreStartup.cs | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/FlexJobApi.Core/FlexJobApiCoreStartup.cs b/FlexJobApi.Core/FlexJobApiCoreStartup.cs index c913fe3..cc2c31d 100644 --- a/FlexJobApi.Core/FlexJobApiCoreStartup.cs +++ b/FlexJobApi.Core/FlexJobApiCoreStartup.cs @@ -1,4 +1,5 @@ -锘縰sing Furion; +锘縰sing Consul; +using Furion; using Furion.EventBus; using MediatR; using Microsoft.AspNetCore.Builder; @@ -19,6 +20,8 @@ { public void ConfigureServices(IServiceCollection services) { + services.AddHealthChecks(); + services.AddConsoleFormatter(options => { options.WithTraceId = true; @@ -42,6 +45,10 @@ }); services.AddConfigurableOptions<AliyunOptions>(); + + services.AddHttpRemote(); + + services.AddComponent<ConsulServiceComponent>(); services.AddComponent<EventBusServiceComponent>(); @@ -106,8 +113,11 @@ app.UseEndpoints(endpoints => { endpoints.MapControllers(); + endpoints.MapHealthChecks("/healthz"); }); + app.UseComponent<ConsulApplicationComponent>(env); + //lifetime.ApplicationStarted.Register(async () => //{ // await ResourceUtils.BuildDynamicControllersAsync(); -- Gitblit v1.9.1