整理配置文件,jwt过期时间和缓冲时间支持1d2h3m4s事件类型 (#1218)
* feat: human duration * Update config.yaml * 调整配置文件结构 Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
@@ -7,14 +7,12 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/songzhibin97/gkit/cache/local_cache"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
_ "github.com/flipped-aurora/gin-vue-admin/server/packfile"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// Viper //
|
||||
@@ -72,8 +70,5 @@ func Viper(path ...string) *viper.Viper {
|
||||
|
||||
// root 适配性 根据root位置去找到对应迁移位置,保证root路径有效
|
||||
global.GVA_CONFIG.AutoCode.Root, _ = filepath.Abs("..")
|
||||
global.BlackCache = local_cache.NewCache(
|
||||
local_cache.SetDefaultExpire(time.Second * time.Duration(global.GVA_CONFIG.JWT.ExpiresTime)),
|
||||
)
|
||||
return v
|
||||
}
|
||||
|
Reference in New Issue
Block a user