feature: mongoDB 支持 (#1565)

* feature: mongoDB 支持

* update: 修改错误mongo索引示例

* update: 在system添加use-mongo 开关开启或者关闭mongo
This commit is contained in:
SliverHorn
2023-10-14 13:59:30 +08:00
committed by GitHub
parent b3dbb8d4be
commit 232aaad090
12 changed files with 345 additions and 1 deletions
+6 -1
View File
@@ -19,7 +19,12 @@ func RunWindowsServer() {
// 初始化redis服务
initialize.Redis()
}
if global.GVA_CONFIG.System.UseMongo {
err := initialize.Mongo.Initialization()
if err != nil {
zap.L().Error(fmt.Sprintf("%+v", err))
}
}
// 从db加载jwt数据
if global.GVA_DB != nil {
system.LoadAll()