2026-04-15 18:28:52 +08:00

43 lines
1.6 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.

dataSources:
wallet:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.jdbc.Driver
jdbcUrl: jdbc:p6spy:mysql://mysql:3306/likei_wallet?characterEncoding=utf8&useUnicode=true&useSSL=false&allowMultiQueries=true&useLegacyDatetimeCode=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&autoReconnect=true
username: root
password: 123456
#hikari:
# 连接池名称
poolName: WalletDbPool
#最小空闲连接数量
minimumIdle: 5
# 空闲连接存活最大时间默认60000010分钟
idleTimeout: 180000
# 连接池最大连接数默认是10 推荐的公式:((core_count * 2) + effective_spindle_count)
maximumPoolSize: 10
# 此属性控制从池返回的连接的默认自动提交行为,默认值true
autoCommit: true
# 此属性控制池中连接的最长生命周期值0表示无限生命周期默认1800000即30分钟
maxLifetime: 1800000
# 数据库连接超时时间,默认30秒即30000
connectionTimeout: 30000
connectionTestQuery: SELECT 1
props:
sql-show: true
rules:
- !SHARDING
tables:
wallet_gold_asset_record:
actualDataNodes: wallet.wallet_gold_asset_record_${1..12}
tableStrategy:
standard:
shardingColumn: create_time
shardingAlgorithmName: wallet_gold_asset_record_inline
shardingAlgorithms:
wallet_gold_asset_record_inline:
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.red.circle.framework.shardingsphere.sharding.TimeMonthShardingAlgorithm