add jwt / complete the rotation verification

This commit is contained in:
landaiqing
2024-08-12 22:05:59 +08:00
parent 54f6256c00
commit 48c5aeb0f4
31 changed files with 1702 additions and 44 deletions

12
main.go
View File

@@ -9,18 +9,18 @@ import (
func main() {
// 初始化配置
core.InitConfig()
core.InitLogger()
core.InitGorm()
core.InitCaptcha()
core.InitRedis()
core.InitConfig() // 读取配置文件
core.InitLogger() // 初始化日志
core.InitGorm() // 初始化数据库
core.InitRedis() // 初始化redis
core.InitCaptcha() // 初始化验证码
// 命令行参数绑定
option := cmd.Parse()
if cmd.IsStopWeb(&option) {
cmd.SwitchOption(&option)
return
}
r := router.InitRouter()
r := router.InitRouter() // 初始化路由
addr := global.CONFIG.System.Addr()
global.LOG.Info("Server run on ", addr)
err := r.Run(addr)