抽离配置到nacos里
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"admin/internal/config"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"pkg.local/utils"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
@@ -16,6 +17,6 @@ func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
DB: db,
|
||||
Prefix: c.Mysql.Prefix,
|
||||
Prefix: utils.GetConfigString("mysql.prefix"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user