sharding:
  jdbc:
    datasource:
      names: ds
      ds:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
        username: ${zlt.datasource.username}
        password: ${zlt.datasource.password}
    config:
      sharding:
        tables:
          user:
            actual-data-nodes: ds.user_$->{0..1}
            table-strategy:
              inline:
                sharding-column: id
                algorithm-expression: user_$->{id % 2}
            key-generator-column-name: id
      props:
        sql:
          show: true