Commit c62d1b5452c57395b6639af9dcdd7548472927f9

Authored by 多国蒙
2 parents 5f8f843e 881909a7
Showing 1 changed file with 12 additions and 2 deletions
account-service.yml
@@ -75,11 +75,21 @@ sharding.jdbc: @@ -75,11 +75,21 @@ sharding.jdbc:
75 username: test 75 username: test
76 password: ENC(8aea42e66b0928c44cd8f861a9d558e6) 76 password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
77 masterSlaveRule: 77 masterSlaveRule:
78 - name: ds_ms 78 + name: ms_ds
79 masterDataSourceName: ds_master 79 masterDataSourceName: ds_master
80 slaveDataSourceNames: ds_slave0 80 slaveDataSourceNames: ds_slave0
81 props: 81 props:
82 - sql.show: true 82 + sql.show: true
  83 + shardingRule:
  84 + tables:
  85 + Account:
  86 + actualDataNodes: ms_ds.Account${0..1}
  87 + tableStrategy:
  88 + inline:
  89 + shardingColumn: UUID
  90 + algorithmExpression: Account${UUID.hashCode() % 2}
  91 +
  92 +
83 93
84 #mybatis: 94 #mybatis:
85 #configLocation: classpath:mybatis-config.xml 95 #configLocation: classpath:mybatis-config.xml