Files
assets/config.yml
qhd 829dc07747 refactor: 重构资产实体和DTO结构类型
将gjson.Json类型替换为具体的结构体和map类型,修正DAO层链式调用,启用SKU元数据校验逻辑
2026-03-22 20:08:32 +08:00

124 lines
3.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server:
address: ":3003"
name: "assets"
workerId: 1
#logPath: "resource/log/server"
logStdout: true
errorStack: true
#errorLogEnabled: true
#errorLogPattern: "error-{Ymd}.log"
#accessLogEnabled: true
#accessLogPattern: "access-{Ymd}.log"
rate:
limit: 200
burst: 300
# Database.
database:
default:
- type: "pgsql"
host: "localhost"
port: "5432"
user: "postgres"
pass: "123456"
name: "assets"
role: "master"
maxIdle: "5"
maxOpen: "20"
maxLifetime: "60s"
charset: "utf8mb4" #数据库编码
debug: true
dryRun: false #空跑
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
- type: "pgsql"
host: "localhost"
port: "5432"
user: "postgres"
pass: "123456"
name: "assets"
role: "slave"
maxIdle: "5"
maxOpen: "20"
maxLifetime: "60s"
charset: "utf8mb4" #数据库编码
debug: true
dryRun: false #空跑
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
tenant-1:
- type: "pgsql" # 使用自定义驱动,自动赋值创建人/修改人/租户ID
host: "localhost"
port: "5432"
user: "postgres"
pass: "123456"
name: "tenant"
role: "master"
maxIdle: "5"
maxOpen: "20"
maxLifetime: "60s"
charset: "utf8" #数据库编码
debug: true
dryRun: false #空跑
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
redis:
# 集群模式配置方法
default:
address: localhost:6379
db: 0
idleTimeout: "60s"
maxConnLifetime: "90s"
waitTimeout: "60s"
dialTimeout: "30s"
readTimeout: "30s"
writeTimeout: "30s"
maxActive: 100
test:
address: localhost:6379
db: 1
idleTimeout: "60s"
maxConnLifetime: "90s"
waitTimeout: "60s"
dialTimeout: "30s"
readTimeout: "30s"
writeTimeout: "30s"
maxActive: 100
consul:
address: localhost:8500
jaeger:
addr: localhost:4318
nats:
default:
url: "nats://localhost:4222"
# 文件上传服务地址与oss模块minio中的endpoint一致
filePrefix: "116.204.74.41:9000"
cache:
localTTL: 60
redisTTL: 300
gmq:
redis:
primary:
addr: "localhost"
port: "6379"
db: 0
username: ""
password: ""
poolSize: 10
minIdleConn: 5
maxActiveConn: 10
maxRetries: 30