Files
hamster-core/core-common/src/main/resources/datasource.yml
2023-08-07 17:16:39 +08:00

42 lines
1.4 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.

# 数据库链接驱动地址
# 除非你知道自己在做什么,否则不建议更改该项
# 旧版服务端低于1.13请使用com.mysql.jdbc.Driver
driver: "com.mysql.cj.jdbc.Driver"
# 数据库链接填写格式:
# jdbc:mysql://{数据库地址}:{数据库端口}/{使用的库名}?参数
# 除非你知道自己在做什么,否则不建议随意更改参数
url: "jdbc:mysql://sql.hamster3.cn:3306/Test1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true"
# 用户名
username: "Test"
# 密码
password: "Test123.."
# 最小闲置链接数
# 推荐值0~3
minimum-idle: 0
# 最大链接数
# 推荐值:
# 子服:最大在线玩家数/10且不低于3
# BC最大在线玩家数/20且不低于5
maximum-pool-size: 3
# 保持连接池可用的间隔
# 除非你的服务器数据库连接经常断开,否则不建议启用该选项
# 单位:毫秒
# 默认值为0禁用
keep-alive-time: 0
# 连接闲置回收时间
# 单位:毫秒
# 推荐值60000010分钟
idle-timeout: 600000
# 链接最长存活时间
# 单位:毫秒
max-lifetime: 1800000
# 验证连接存活的超时时间
# 单位:毫秒
validation-timeout: 5000
# 如果你不需要做多端跨服,那么请使用 sqlite 作本地数据库
# driver: "org.sqlite.JDBC"
# url: "jdbc:sqlite:./plugins/HamsterCore/database.db"