You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/13 05:44:01 UTC

[GitHub] [shardingsphere] 726411951 commented on issue #20951: How to implement sharding algorithm in version 5.2.0

726411951 commented on issue #20951:
URL: https://github.com/apache/shardingsphere/issues/20951#issuecomment-1244927782

   @strongduanmu  almost like 
   ```
   spring.shardingsphere.datasource.names=ds0,ds1
   
   spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.cj.jdbc.Driver
   spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://192.168.0.1:3306/oms_base0?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
   spring.shardingsphere.datasource.ds0.username=root
   spring.shardingsphere.datasource.ds0.password=xxx
   
   spring.shardingsphere.datasource.ds1.type=com.zaxxer.hikari.HikariDataSource
   spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.cj.jdbc.Driver
   spring.shardingsphere.datasource.ds1.jdbc-url=jdbc:mysql://192.168.0.1:3306/oms_base1?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
   spring.shardingsphere.datasource.ds1.username=root
   spring.shardingsphere.datasource.ds1.password=xxx
   
   spring.shardingsphere.rules.sharding.tables.oms_biz_order.database-strategy.standard.sharding-column=merchant_id
   spring.shardingsphere.rules.sharding.tables.oms_biz_order.database-strategy.standard.sharding-algorithm-name=shardingAlgorithmConfig
   
   spring.shardingsphere.rules.sharding.tables.oms_detail.database-strategy.standard.sharding-column=merchant_id
   spring.shardingsphere.rules.sharding.tables.oms_detail.database-strategy.standard.sharding-algorithm-name=shardingAlgorithmConfig
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org