Files
hamster-core/core-bungee/src/main/resources/config.yml

49 lines
1.7 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.

# 是否启用 redis 连接池功能
enable-redis: false
# redis 连接配置
# 完整格式如下:
# redis://用户名:密码@主机名:端口/数据库索引?参数名=参数值&参数名=参数值
# 若没有设置 redis 用户名,但设置了密码,则可以使用以下格式:
# redis://:密码@localhost:6379?clientName=HamsterCore
# 若没有设置 redis 用户名,也没有设置密码,则可以使用以下格式:
# redis://localhost:6379?clientName=HamsterCore
# 若不设置数据库,则默认使用 0
redis-url: "redis://localhost:6379/0?clientName=HamsterCore&timeout=5s"
# 是否启用数据库连接池功能
enable-database: false
# 数据库连接池配置
datasource:
# 数据库链接驱动地址
driver: "com.mysql.cj.jdbc.Driver"
# MySQL数据库链接填写格式:
# jdbc:mysql://{数据库地址}:{数据库端口}/{使用的库名}?参数
url: "jdbc:mysql://localhost:3306/Test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true"
# 用户名
username: "root"
# 密码
password: "Root123.."
# 最小闲置链接数
# 推荐值1~3
minimum-idle: 0
# 最大链接数
# 推荐值不低于3
maximum-pool-size: 3
# 保持连接池可用的间隔
# 除非你的服务器数据库连接经常断开,否则不建议启用该选项
# 单位:毫秒
# 默认值为0禁用
keep-alive-time: 0
# 连接闲置回收时间
# 单位:毫秒
# 推荐值60000010分钟
idle-timeout: 600000
# 链接最长存活时间
# 单位:毫秒
max-lifetime: 1800000
# 验证连接存活的超时时间
# 单位:毫秒
validation-timeout: 5000