config.toml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. # Logger.
  19. [logger]
  20. Path = "./data/log/gf-app"
  21. Level = "all"
  22. Stdout = true
  23. # Template.
  24. [viewer]
  25. paths = ["./template"]
  26. defaultFile = "index.html"
  27. delimiters = ["${", "}"]
  28. # Database.
  29. [database]
  30. link = "mysql:root:123456@tcp(localhost:3306)/gfast-v2-open"
  31. charset = "utf8mb4" #数据库编码
  32. debug = true
  33. dryRun = false #空跑
  34. maxIdle = "10" #连接池最大闲置的连接数
  35. maxOpen = "10" #连接池最大打开的连接数
  36. maxLifetime = "30" #(单位秒)连接对象可重复使用的时间长度
  37. # Database logger.
  38. [database.logger]
  39. Path = "./data/log/gf-app/sql"
  40. Level = "all"
  41. Stdout = true
  42. # Redis数据库配置
  43. [redis]
  44. open = true #是否开启 redis 缓存 若不开启使用gchache缓存方式
  45. default = "127.0.0.1:6379,2?idleTimeout=20&maxActive=100"
  46. #jwt配置
  47. [gToken]
  48. [gToken.system]
  49. CacheMode = 2
  50. CacheKey = "GToken:"
  51. Timeout = 10800000 #3个小时
  52. MaxRefresh = 0
  53. TokenDelimiter="_"
  54. EncryptKey = "koi29a83idakguqjq29asd9asd8a7jhq"
  55. AuthFailMsg = "登录超时,请重新登录"
  56. MultiLogin = true #后台是否允许多端同时在线
  57. [system]
  58. notCheckAuthAdminIds = [1,2,31] #无需验证后台权限的用户id
  59. #casbin配置
  60. [casbin]
  61. modelFile="./config/casbin_conf/rbac_model.conf"
  62. policyFile="./config/casbin_conf/rbac_policy.csv"
  63. # Gen
  64. [gen]
  65. author = "gfast"
  66. moduleName = "system"
  67. packageName = "gfast/app/system"
  68. autoRemovePre = true #是否自动删除表前缀
  69. tablePrefix = "table_,qxkj_" #表前缀
  70. templatePath = "./template/vm" #代码生成模板路径
  71. frontDir = "F:/tools/webProject/gfast-ui" #前端路径
  72. # 上传配置
  73. [upload]
  74. type = "local" #local:本地,tencentCOS:腾讯云 , 七牛云 阿里云等开发中...
  75. [upload.tencentCOS] #腾讯云cos配置
  76. UpPath = "/gfast/"
  77. RawUrl = "https://您的cos空间域名.cos.ap-chongqing.myqcloud.com"
  78. SecretID = "填写您的SecretID"
  79. SecretKey = "填写您的SecretKey"
  80. [upload.local] #本地上传配置
  81. UpPath = "/pub_upload/" #上传路径
  82. # 插件管理
  83. [plugin]
  84. serverUrl = "https://plugins.g-fast.cn" #获取插件商城插件列表