| 
														
															@@ -55,6 +55,8 @@ using System.Text.RegularExpressions; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using Swashbuckle.AspNetCore.SwaggerGen; 
														 | 
														
														 | 
														
															 using Swashbuckle.AspNetCore.SwaggerGen; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using System.Text.Json.Serialization; 
														 | 
														
														 | 
														
															 using System.Text.Json.Serialization; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 using FreeRedis; 
														 | 
														
														 | 
														
															 using FreeRedis; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+using HealthChecks.UI.Client; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+using Microsoft.AspNetCore.Diagnostics.HealthChecks; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 namespace ZhonTai.Admin.Core; 
														 | 
														
														 | 
														
															 namespace ZhonTai.Admin.Core; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -181,6 +183,9 @@ public class HostApp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         _hostAppOptions?.ConfigurePreServices?.Invoke(hostAppContext); 
														 | 
														
														 | 
														
															         _hostAppOptions?.ConfigurePreServices?.Invoke(hostAppContext); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //健康检查 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        services.AddHealthChecks(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //雪花漂移算法 
														 | 
														
														 | 
														
															         //雪花漂移算法 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         var idGeneratorOptions = new IdGeneratorOptions(1) { WorkerIdBitLength = 6 }; 
														 | 
														
														 | 
														
															         var idGeneratorOptions = new IdGeneratorOptions(1) { WorkerIdBitLength = 6 }; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         _hostAppOptions?.ConfigureIdGenerator?.Invoke(idGeneratorOptions); 
														 | 
														
														 | 
														
															         _hostAppOptions?.ConfigureIdGenerator?.Invoke(idGeneratorOptions); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -709,6 +714,16 @@ public class HostApp 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         #endregion Swagger Api文档 
														 | 
														
														 | 
														
															         #endregion Swagger Api文档 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //使用健康检查 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(appConfig.HealthChecks.Enable) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            app.MapHealthChecks(appConfig.HealthChecks.Path, new HealthCheckOptions() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                Predicate = _ => true, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         _hostAppOptions?.ConfigurePostMiddleware?.Invoke(hostAppMiddlewareContext); 
														 | 
														
														 | 
														
															         _hostAppOptions?.ConfigurePostMiddleware?.Invoke(hostAppMiddlewareContext); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 |