config.toml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # HTTP Server
  2. [server]
  3. Address = ":8200"
  4. ServerRoot = "./public/resource"
  5. ServerAgent = "gfast-app"
  6. LogPath = "./data/log/gf-app/server"
  7. logStdout = true # 日志是否输出到终端。默认为true
  8. errorStack = true # 当Server捕获到异常时是否记录堆栈信息到日志中。默认为true
  9. errorLogPattern = "error-{Ymd}.log" # 异常错误日志文件格式。默认为"error-{Ymd}.log"
  10. accessLogPattern = "access-{Ymd}.log" # 访问日志文件格式。默认为"access-{Ymd}.log"
  11. DumpRouterMap = true
  12. NameToUriType = 3
  13. maxHeaderBytes = "20KB"
  14. clientMaxBodySize = "200MB"
  15. accessLogEnabled = true # 是否记录访问日志。默认为false
  16. errorLogEnabled = true # 是否记录异常日志信息到日志中。默认为true
  17. PProfEnabled = true # 是否开启PProf性能调试特性。默认为false
  18. debug = true # 是否是调试模式
  19. readTimeout = "180s" # 响应超时 3分钟
  20. # Logger.
  21. [logger]
  22. Path = "./data/log/gf-app"
  23. Level = "all"
  24. Stdout = true
  25. # Template.
  26. [viewer]
  27. paths = ["./template"]
  28. defaultFile = "index.html"
  29. delimiters = ["${", "}"]
  30. # Database.
  31. [database]
  32. link = "mysql:root:123456@tcp(localhost:3306)/gfast-v2-os"
  33. charset = "utf8mb4" #数据库编码
  34. debug = true
  35. dryRun = false #空跑
  36. maxIdle = "10" #连接池最大闲置的连接数
  37. maxOpen = "10" #连接池最大打开的连接数
  38. maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
  39. # Database logger.
  40. [database.logger]
  41. Path = "./data/log/gf-app/sql"
  42. Level = "all"
  43. Stdout = true
  44. # Redis数据库配置
  45. [redis]
  46. open = true #是否开启 redis 缓存 若不开启使用gchache缓存方式
  47. default = "127.0.0.1:6379,9?idleTimeout=20&maxActive=100"
  48. #jwt配置
  49. [gToken]
  50. [gToken.system]
  51. CacheMode = 2
  52. CacheKey = "GToken:"
  53. Timeout = 10800000 #3个小时
  54. MaxRefresh = 0
  55. TokenDelimiter="_"
  56. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  57. AuthFailMsg = "登录超时,请重新登录"
  58. MultiLogin = true #后台是否允许多端同时在线
  59. [system]
  60. notCheckAuthAdminIds = [1,2,31] #无需验证后台权限的用户id
  61. #casbin配置
  62. [casbin]
  63. modelFile="./config/casbin_conf/rbac_model.conf"
  64. policyFile="./config/casbin_conf/rbac_policy.csv"
  65. # Gen
  66. [gen]
  67. author = "gfast"
  68. moduleName = "system"
  69. packageName = "gfast/app/system"
  70. autoRemovePre = true #是否自动删除表前缀
  71. tablePrefix = "table_,qxkj_" #表前缀
  72. templatePath = "./template/vm" #代码生成模板路径
  73. frontDir = "F:/tools/webProject/gfast-ui" #前端路径
  74. # 上传配置
  75. [upload]
  76. type = "local" #local:本地,tencentCOS:腾讯云 , 七牛云 阿里云等开发中...
  77. [upload.tencentCOS] #腾讯云cos配置
  78. UpPath = "/gfast/"
  79. RawUrl = "https://您的cos空间域名.cos.ap-chongqing.myqcloud.com"
  80. SecretID = "填写您的SecretID"
  81. SecretKey = "填写您的SecretKey"
  82. [upload.local] #本地上传配置
  83. UpPath = "/pub_upload/" #上传路径
  84. # 插件管理
  85. [plugin]
  86. serverUrl = "https://plugins.g-fast.cn" #获取插件商城插件列表