application.yml的配置文件 解读
spring:
shardingsphere:
# 属性配置
props:
# 是否开启 SQL 显示,默认值: false
sql:
show: true
# 数据源配置,可配置多个
datasource:
# 本案例中配置了两个数据源,分别对应刚才创建的两个 MySQL 容器
names: ds0,ds1
ds0:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.116.131:3310/db_device_0?useUnicode=true&characterEncoding=utf-8&serverTimezone=Hongkong&useSSL=false
username: root
password: '123456'
ds1:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.116.131:3311/db_device_0?useUnicode=true&characterEncoding=utf-8&serverTimezone=Hongkong&useSSL=false
username: root
password: '123456'
# 分片规则配置
sharding:
# 绑定表规则列表
binding-t