config.toml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # 数据库连接
  2. [database]
  3. link = "mysql:root:123456@tcp(127.0.0.1:3306)/gfast"
  4. maxIdle = "10" #连接池最大闲置的连接数
  5. maxOpen = "10" #连接池最大打开的连接数
  6. maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
  7. debug = true
  8. #web服务器配置
  9. [server]
  10. Address = ":8080"
  11. ServerRoot = "./public/resource"
  12. AccessLogEnabled = true
  13. ErrorLogEnabled = true
  14. PProfEnabled = true
  15. LogPath = "./data/log/server_log"
  16. SessionIdName = "sysSessionId"
  17. SessionPath = "./data/session"
  18. SessionMaxAge = "24h"
  19. DumpRouterMap = true
  20. # Redis数据库配置
  21. [redis]
  22. default = "127.0.0.1:6379,1"
  23. #jwt配置
  24. [gToken]
  25. CacheMode = 2
  26. CacheKey = "GToken:"
  27. Timeout = 0
  28. MaxRefresh = 0
  29. TokenDelimiter="_"
  30. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  31. AuthFailMsg = "登录超时,请重新登录"
  32. MultiLogin = true
  33. #单例日志配置 g.Log(单例名称)获取Logger单例对象时
  34. [logger]
  35. path = "./data/log/run_log"
  36. level = "all"
  37. stdout = true