添加代码生成中route和gorm的自动注入

This commit is contained in:
LeonardWang
2021-03-19 23:24:55 +08:00
parent 9e0f95ec48
commit 0a3696ee01
8 changed files with 178 additions and 13 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/spf13/viper"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"path/filepath"
)
//@author: [songzhibin97](https://github.com/songzhibin97)
@@ -154,5 +155,6 @@ func InitDB(conf request.InitDB) error {
_ = writeConfig(global.GVA_VP, baseSetting)
return err
}
global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..")
return nil
}