fenglex opened a new issue #10936:
URL: https://github.com/apache/shardingsphere/issues/10936


   使用以下配置项启动shardingsphere-jdbc-core-spring-boot-starter  
   
   ```
   spring:
     shardingsphere:
       props:
         sql-show: true
       datasource:
         common:
           driver-class-name: com.mysql.jdbc.Driver
         names: ds
         ds:
           jdbc-url: jdbc:mysql://hk:3306/db_sharding
           username: root
           driver-class-name: com.mysql.jdbc.Driver
           password: 'nQCk'
           type: com.zaxxer.hikari.HikariDataSource
       rules:
         sharding:
           sharding-algorithms:
             table-inline:
               # 使用了内置的分片算法-INLINE
               type: HASH_MOD
               props:
                 sharding-count: 5
             database-inline:
               type: INLINE
               props:
                 algorithm-expression: ds
           tables:
             tb_data_value:
               actual-data-nodes: ds.tb_data_value$->{0..4}
               table-strategy:
                 standard:
                   sharding-column: data_code
                   sharding-algorithm-name: table-inline
               database-strategy:
                 standard:
                   sharding-column: id
                   sharding-algorithm-name: database-inline
       enabled: true
   ```
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to