mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
V2.5.2beta (#1101)
* fix: zap无法在运行时进行切割日志, config.docker.yaml与config.yaml同步 #1094 * feat: 为定时任务增加秒级控制 * feat: 调整代码结构,err更改为后置 * css 样式调整 Co-authored-by: SliverHorn <503551462@qq.com> Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
committed by
GitHub
co-authored by
SliverHorn
songzhibin97
parent
b25c128051
commit
83141b3564
+68
-16
@@ -5,17 +5,18 @@ jwt:
|
||||
signing-key: 'qmPlus'
|
||||
expires-time: 604800
|
||||
buffer-time: 86400
|
||||
issuer: 'qmPlus'
|
||||
|
||||
# zap logger configuration
|
||||
zap:
|
||||
level: 'info'
|
||||
format: 'console'
|
||||
prefix: '[github.com/flipped-aurora/gin-vue-admin/server]'
|
||||
format: 'console'
|
||||
director: 'log'
|
||||
link-name: 'latest_log'
|
||||
show-line: true
|
||||
encode-level: 'LowercaseColorLevelEncoder'
|
||||
stacktrace-key: 'stacktrace'
|
||||
max-age: 30 # 默认日志留存默认以天为单位
|
||||
show-line: true
|
||||
log-in-console: true
|
||||
|
||||
# redis configuration
|
||||
@@ -44,7 +45,12 @@ system:
|
||||
addr: 8888
|
||||
db-type: 'mysql'
|
||||
oss-type: 'local' # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
|
||||
use-redis: false # 使用redis
|
||||
use-multipoint: false
|
||||
# IP限制次数 一个小时15000次
|
||||
iplimit-count: 15000
|
||||
# IP限制一个小时
|
||||
iplimit-time: 3600
|
||||
|
||||
# captcha configuration
|
||||
captcha:
|
||||
@@ -53,6 +59,7 @@ captcha:
|
||||
img-height: 80
|
||||
|
||||
# mysql connect configuration
|
||||
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
||||
mysql:
|
||||
path: ''
|
||||
port: ''
|
||||
@@ -65,6 +72,36 @@ mysql:
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
|
||||
# pgsql connect configuration
|
||||
# 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
|
||||
pgsql:
|
||||
path: ''
|
||||
port: ''
|
||||
config: ''
|
||||
db-name: ''
|
||||
username: ''
|
||||
password: ''
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
|
||||
db-list:
|
||||
- disabled: true # 是否启用
|
||||
type: "" # 数据库的类型,目前支持mysql、pgsql
|
||||
alias-name: "" # 数据库的名称,注意: alias-name 需要在db-list中唯一
|
||||
path: ''
|
||||
port: ''
|
||||
config: ''
|
||||
db-name: ''
|
||||
username: ''
|
||||
password: ''
|
||||
max-idle-conns: 10
|
||||
max-open-conns: 100
|
||||
log-mode: ""
|
||||
log-zap: false
|
||||
|
||||
|
||||
# local configuration
|
||||
local:
|
||||
path: 'uploads/file'
|
||||
@@ -72,14 +109,17 @@ local:
|
||||
# autocode configuration
|
||||
autocode:
|
||||
transfer-restart: true
|
||||
# root 自动适配项目根目录
|
||||
# 请不要手动配置,他会在项目加载的时候识别出根路径
|
||||
root: ""
|
||||
server: /server
|
||||
server-api: /api/v1
|
||||
server-plug: /plugin/%s
|
||||
server-api: /api/v1/%s
|
||||
server-initialize: /initialize
|
||||
server-model: /model
|
||||
server-request: /model/request/
|
||||
server-router: /router
|
||||
server-service: /service
|
||||
server-model: /model/%s
|
||||
server-request: /model/%s/request/
|
||||
server-router: /router/%s
|
||||
server-service: /service/%s
|
||||
web: /web/src
|
||||
web-api: /api
|
||||
web-form: /view
|
||||
@@ -102,6 +142,7 @@ aliyun-oss:
|
||||
access-key-secret: 'yourAccessKeySecret'
|
||||
bucket-name: 'yourBucketName'
|
||||
bucket-url: 'yourBucketUrl'
|
||||
base-path: 'yourBasePath'
|
||||
|
||||
# tencent cos configuration
|
||||
tencent-cos:
|
||||
@@ -112,6 +153,18 @@ tencent-cos:
|
||||
base-url: 'https://gin.vue.admin'
|
||||
path-prefix: 'github.com/flipped-aurora/gin-vue-admin/server'
|
||||
|
||||
# aws s3 configuration (minio compatible)
|
||||
aws-s3:
|
||||
bucket: xxxxx-10005608
|
||||
region: ap-shanghai
|
||||
endpoint: ''
|
||||
s3-force-path-style: false
|
||||
disable-ssl: false
|
||||
secret-id: xxxxxxxx
|
||||
secret-key: xxxxxxxx
|
||||
base-url: https://gin.vue.admin
|
||||
path-prefix: github.com/flipped-aurora/gin-vue-admin/server
|
||||
|
||||
# huawei obs configuration
|
||||
hua-wei-obs:
|
||||
path: 'you-path'
|
||||
@@ -128,14 +181,13 @@ excel:
|
||||
Timer:
|
||||
start: true
|
||||
spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
|
||||
detail: [
|
||||
# tableName: 需要清理的表名
|
||||
# compareField: 需要比较时间的字段
|
||||
# interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
|
||||
# 2160h = 24 * 30 * 3 -> 三个月
|
||||
{ tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
|
||||
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
|
||||
]
|
||||
detail:
|
||||
- tableName: "sys_operation_records"
|
||||
compareField: "created_at"
|
||||
interval: "2160h"
|
||||
- tableName: "jwt_blacklists"
|
||||
compareField: "created_at"
|
||||
interval: "168h"
|
||||
|
||||
# 跨域配置
|
||||
# 需要配合 server/initialize/router.go#L32 使用
|
||||
|
||||
Reference in New Issue
Block a user