config.toml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. #web服务器配置
  15. [server]
  16. Address = ":8200"
  17. ServerRoot = "./public/resource"
  18. AccessLogEnabled = true
  19. ErrorLogEnabled = true
  20. PProfEnabled = true
  21. LogPath = "./data/log/server_log"
  22. SessionIdName = "sysSessionId"
  23. SessionPath = "./data/session"
  24. SessionMaxAge = "24h"
  25. DumpRouterMap = true
  26. NameToUriType = 3
  27. # Redis数据库配置
  28. [redis]
  29. default = "127.0.0.1:6379,1"
  30. #jwt配置
  31. [gToken]
  32. CacheMode = 2
  33. CacheKey = "GToken:"
  34. Timeout = 0
  35. MaxRefresh = 0
  36. TokenDelimiter="_"
  37. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  38. AuthFailMsg = "登录超时,请重新登录"
  39. MultiLogin = true
  40. #单例日志配置 g.Log(单例名称)获取Logger单例对象时
  41. [logger]
  42. path = "./data/log/run_log"
  43. level = "all"
  44. stdout = true
  45. #casbin配置
  46. [casbin]
  47. modelFile="./config/casbin_conf/rbac_model.conf"
  48. policyFile="./config/casbin_conf/rbac_policy.csv"
  49. #后台相关配置
  50. [adminInfo]
  51. notCheckAuthAdminIds = [1,31] #无需验证后台权限的用户id
  52. pageNum = 5 #后台列表分页长度
  53. # Gen
  54. [gen]
  55. author = "gfast"
  56. moduleName = "module"
  57. packageName = "gfast"
  58. autoRemovePre = true
  59. tablePrefix = "t_,sys_"
  60. #模板配置
  61. [viewer]
  62. paths = ["./template"]
  63. defaultFile = "index.html"
  64. delimiters = ["${", "}"]