application.yml 798 字节
Newer Older
2
2293736867 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
spring:
  shardingsphere:
    datasource:
      names: test0,test1
      test0:
        type: com.alibaba.druid.pool.DruidDataSource
        url: jdbc:mysql://127.0.0.1:3306/test0
        username: root
        password: 123456
      test1:
        type: com.alibaba.druid.pool.DruidDataSource
        url: jdbc:mysql://127.0.0.1:3306/test1
        username: root
        password: 123456
    sharding:
      default-database-strategy:
        inline:
          sharding-column: age
          algorithm-expression: test$->{age % 2}
      tables:
        user:
          actual-data-nodes: test$->{0..1}.user$->{0..2}
          table-strategy:
            inline:
              sharding-column: id
              algorithm-expression: user$->{id%3}
    props:
      sql:
        show:
2
2293736867 已提交
30
          true