|
| 1 | +# Gin-Vue-Admin Global Configuration |
| 2 | + |
| 3 | +# jwt configuration |
| 4 | +jwt: |
| 5 | + signing-key: 'qmPlus' |
| 6 | + expires-time: 604800 |
| 7 | + buffer-time: 86400 |
| 8 | + |
| 9 | +# zap logger configuration |
| 10 | +zap: |
| 11 | + level: 'info' |
| 12 | + format: 'console' |
| 13 | + prefix: '[GIN-VUE-ADMIN]' |
| 14 | + director: 'log' |
| 15 | + link-name: 'latest_log' |
| 16 | + show-line: true |
| 17 | + encode-level: 'LowercaseColorLevelEncoder' |
| 18 | + stacktrace-key: 'stacktrace' |
| 19 | + log-in-console: true |
| 20 | + |
| 21 | +# redis configuration |
| 22 | +redis: |
| 23 | + db: 0 |
| 24 | + addr: '127.0.0.1:6379' |
| 25 | + password: '' |
| 26 | + |
| 27 | +# email configuration |
| 28 | +email: |
| 29 | + to: 'xxx@qq.com' |
| 30 | + port: 465 |
| 31 | + from: 'xxx@163.com' |
| 32 | + host: 'smtp.163.com' |
| 33 | + is-ssl: true |
| 34 | + secret: 'xxx' |
| 35 | + nickname: 'test' |
| 36 | + |
| 37 | +# casbin configuration |
| 38 | +casbin: |
| 39 | + model-path: './resource/rbac_model.conf' |
| 40 | + |
| 41 | +# system configuration |
| 42 | +system: |
| 43 | + env: 'public' # Change to "develop" to skip authentication for development mode |
| 44 | + addr: 8888 |
| 45 | + db-type: 'mysql' |
| 46 | + oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置 |
| 47 | + use-multipoint: false |
| 48 | + |
| 49 | +# captcha configuration |
| 50 | +captcha: |
| 51 | + key-long: 6 |
| 52 | + img-width: 240 |
| 53 | + img-height: 80 |
| 54 | + |
| 55 | +# mysql connect configuration |
| 56 | +# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://www.gin-vue-admin.com/docs/first) |
| 57 | +mysql: |
| 58 | + path: '' |
| 59 | + config: '' |
| 60 | + db-name: '' |
| 61 | + username: '' |
| 62 | + password: '' |
| 63 | + max-idle-conns: 10 |
| 64 | + max-open-conns: 100 |
| 65 | + log-mode: false |
| 66 | + log-zap: "" |
| 67 | + |
| 68 | +# local configuration |
| 69 | +local: |
| 70 | + path: 'uploads/file' |
| 71 | + |
| 72 | +# autocode configuration |
| 73 | +autocode: |
| 74 | + transfer-restart: true |
| 75 | + root: "" |
| 76 | + server: /server |
| 77 | + server-api: /api/v1/autocode |
| 78 | + server-initialize: /initialize |
| 79 | + server-model: /model/autocode |
| 80 | + server-request: /model/autocode/request/ |
| 81 | + server-router: /router/autocode |
| 82 | + server-service: /service/autocode |
| 83 | + web: /web/src |
| 84 | + web-api: /api |
| 85 | + web-flow: /view |
| 86 | + web-form: /view |
| 87 | + web-table: /view |
| 88 | + |
| 89 | +# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址) |
| 90 | +qiniu: |
| 91 | + zone: 'ZoneHuaDong' |
| 92 | + bucket: '' |
| 93 | + img-path: '' |
| 94 | + use-https: false |
| 95 | + access-key: '' |
| 96 | + secret-key: '' |
| 97 | + use-cdn-domains: false |
| 98 | + |
| 99 | + |
| 100 | +# aliyun oss configuration |
| 101 | +aliyun-oss: |
| 102 | + endpoint: 'yourEndpoint' |
| 103 | + access-key-id: 'yourAccessKeyId' |
| 104 | + access-key-secret: 'yourAccessKeySecret' |
| 105 | + bucket-name: 'yourBucketName' |
| 106 | + bucket-url: 'yourBucketUrl' |
| 107 | + base-path: 'yourBasePath' |
| 108 | + |
| 109 | +# tencent cos configuration |
| 110 | +tencent-cos: |
| 111 | + bucket: 'xxxxx-10005608' |
| 112 | + region: 'ap-shanghai' |
| 113 | + secret-id: 'xxxxxxxx' |
| 114 | + secret-key: 'xxxxxxxx' |
| 115 | + base-url: 'https://gin.vue.admin' |
| 116 | + path-prefix: 'gin-vue-admin' |
| 117 | + |
| 118 | +# excel configuration |
| 119 | +excel: |
| 120 | + dir: './resource/excel/' |
| 121 | + |
| 122 | + |
| 123 | +# timer task db clear table |
| 124 | +Timer: |
| 125 | + start: true |
| 126 | + spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3 |
| 127 | + detail: [ |
| 128 | + # tableName: 需要清理的表名 |
| 129 | + # compareField: 需要比较时间的字段 |
| 130 | + # interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数 |
| 131 | + # 2160h = 24 * 30 * 3 -> 三个月 |
| 132 | + { tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" }, |
| 133 | + #{ tableName: "log2" , compareField: "created_at", interval: "2160h" } |
| 134 | + ] |
0 commit comments