fix
This commit is contained in:
@@ -583,6 +583,7 @@ func NewContainer() *Container {
|
||||
api_service.NewApiUserAggregateService,
|
||||
api_service.NewApiCallAggregateService,
|
||||
api_service.NewApiRequestService,
|
||||
api_service.NewFormConfigService,
|
||||
),
|
||||
|
||||
// API域应用服务
|
||||
@@ -712,6 +713,11 @@ func RegisterLifecycleHooks(
|
||||
OnStart: func(context.Context) error {
|
||||
logger.Info("应用启动中...")
|
||||
logger.Info("所有依赖注入完成,开始启动应用服务")
|
||||
|
||||
// 确保校验器最先初始化
|
||||
validator.InitGlobalValidator()
|
||||
logger.Info("全局校验器初始化完成")
|
||||
|
||||
return nil
|
||||
},
|
||||
OnStop: func(context.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user