|
|
|
@ -26,7 +26,7 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry, rdb redis.Universal
|
|
|
|
|
if v, ok := binding.Validator.Engine().(*validator.Validate); ok {
|
|
|
|
|
_ = v.RegisterValidation("required_if", RequiredIf)
|
|
|
|
|
}
|
|
|
|
|
log.ZInfo(context.Background(), "load config", config.Config)
|
|
|
|
|
log.ZInfo(context.Background(), "load config", "config", config.Config)
|
|
|
|
|
r.Use(gin.Recovery(), mw.CorsHandler(), mw.GinParseOperationID())
|
|
|
|
|
if config.Config.Prometheus.Enable {
|
|
|
|
|
prome.NewApiRequestCounter()
|
|
|
|
|