尝试引入 go-spring

This commit is contained in:
des
2026-01-21 17:44:51 +08:00
parent 35a31a6614
commit feb235e11d
9 changed files with 107 additions and 48 deletions

View File

@@ -2,19 +2,13 @@ package main
import (
"Crimson-Gatekeeper/internal/common"
"fmt"
"gorm.io/gen"
)
func main() {
client, clean := common.GetDataBaseClient()
defer func() {
err := clean()
if err != nil {
fmt.Println("关闭数据库链接失败")
}
}()
client, clean, _ := common.GetDataBaseClient()
defer clean()
g := gen.NewGenerator(gen.Config{
OutPath: "./internal/query",
ModelPkgPath: "./internal/model",