feat:black jwt
This commit is contained in:
@@ -5,6 +5,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/service/system"
|
||||
|
||||
"github.com/songzhibin97/gkit/cache/local_cache"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
_ "github.com/flipped-aurora/gin-vue-admin/server/packfile"
|
||||
@@ -54,5 +59,11 @@ func Viper(path ...string) *viper.Viper {
|
||||
fmt.Println(err)
|
||||
}
|
||||
global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..")
|
||||
global.BlackCache = local_cache.NewCache(
|
||||
local_cache.SetDefaultExpire(time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)))
|
||||
// 从db加载jwt数据
|
||||
if global.GVA_DB != nil {
|
||||
system.LoadAll()
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user