config.toml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. # Gen
  58. [gen]
  59. author = "gfast"
  60. moduleName = "module"
  61. packageName = "gfast"
  62. autoRemovePre = true
  63. tablePrefix = "t_,sys_"
  64. #模板配置
  65. [viewer]
  66. paths = ["./template"]
  67. defaultFile = "index.html"
  68. delimiters = ["${", "}"]