config.toml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # 数据库连接
  2. [database]
  3. link = "mysql:root:123456@tcp(127.0.0.1:3306)/gfast"
  4. charset = "utf8mb4" #数据库编码
  5. maxIdle = "10" #连接池最大闲置的连接数
  6. maxOpen = "10" #连接池最大打开的连接数
  7. maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
  8. debug = true
  9. #web服务器配置
  10. [server]
  11. Address = ":8080"
  12. ServerRoot = "./public/resource"
  13. AccessLogEnabled = true
  14. ErrorLogEnabled = true
  15. PProfEnabled = true
  16. LogPath = "./data/log/server_log"
  17. SessionIdName = "sysSessionId"
  18. SessionPath = "./data/session"
  19. SessionMaxAge = "24h"
  20. DumpRouterMap = true
  21. # Redis数据库配置
  22. [redis]
  23. default = "127.0.0.1:6379,1"
  24. #jwt配置
  25. [gToken]
  26. CacheMode = 2
  27. CacheKey = "GToken:"
  28. Timeout = 0
  29. MaxRefresh = 0
  30. TokenDelimiter="_"
  31. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  32. AuthFailMsg = "登录超时,请重新登录"
  33. MultiLogin = true
  34. #单例日志配置 g.Log(单例名称)获取Logger单例对象时
  35. [logger]
  36. path = "./data/log/run_log"
  37. level = "all"
  38. stdout = true
  39. #casbin配置
  40. [casbin]
  41. modelFile="./config/casbin_conf/rbac_model.conf"
  42. policyFile="./config/casbin_conf/rbac_policy.csv"
  43. #后台相关配置
  44. [adminInfo]
  45. notCheckAuthAdminIds = [1,2,31] #无需验证后台权限的用户id
  46. pageNum = 5 #后台列表分页长度