config.toml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # 数据库连接
  2. [database]
  3. type = "mysql"
  4. host = "127.0.0.1"
  5. port = "3306"
  6. user = "root"
  7. pass = "123456"
  8. name = "gfast_open"
  9. charset = "utf8mb4" #数据库编码
  10. maxIdle = "10" #连接池最大闲置的连接数
  11. maxOpen = "10" #连接池最大打开的连接数
  12. maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
  13. debug = true
  14. path = "data/log/sql"
  15. level = "all"
  16. stdout = true
  17. #web服务器配置
  18. [server]
  19. Address = ":8200"
  20. ServerRoot = "./public/resource"
  21. AccessLogEnabled = true
  22. ErrorLogEnabled = true
  23. PProfEnabled = true
  24. LogPath = "./data/log/server_log"
  25. SessionIdName = "sysSessionId"
  26. SessionPath = "./data/session"
  27. SessionMaxAge = "24h"
  28. DumpRouterMap = true
  29. NameToUriType = 3
  30. # Redis数据库配置
  31. [redis]
  32. default = "127.0.0.1:6379,1"
  33. #jwt配置
  34. [gToken]
  35. CacheMode = 2
  36. CacheKey = "GToken:"
  37. Timeout = 0
  38. MaxRefresh = 0
  39. TokenDelimiter="_"
  40. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  41. AuthFailMsg = "登录超时,请重新登录"
  42. MultiLogin = true
  43. #单例日志配置 g.Log(单例名称)获取Logger单例对象时
  44. [logger]
  45. path = "./data/log/run_log"
  46. level = "all"
  47. stdout = true
  48. #casbin配置
  49. [casbin]
  50. modelFile="./config/casbin_conf/rbac_model.conf"
  51. policyFile="./config/casbin_conf/rbac_policy.csv"
  52. #后台相关配置
  53. [adminInfo]
  54. notCheckAuthAdminIds = [1,2,31] #无需验证后台权限的用户id
  55. pageNum = 10 #后台列表分页长度
  56. dataDir = "./data" #数据目录
  57. encryptKey = "HqmP1KLMuz09Q0Bu" #后台加密
  58. # Gen
  59. [gen]
  60. author = "gfast"
  61. moduleName = "module"
  62. packageName = "gfast"
  63. autoRemovePre = true
  64. tablePrefix = "t_,sys_"
  65. #模板配置
  66. [viewer]
  67. paths = ["./template"]
  68. defaultFile = "index.html"
  69. delimiters = ["${", "}"]