zhaochong-byte removed a comment on issue #12950:
URL: 
https://github.com/apache/shardingsphere/issues/12950#issuecomment-939210612


   > 我的pom是: org.apache.shardingsphere 
shardingsphere-jdbc-core-spring-boot-starter 5.0.0-beta 单表的配置是: spring: 
shardingsphere: # 数据源配置 datasource: # 数据源名称,多数据源以逗号分隔 names: zc # zc: type: 
com.zaxxer.hikari.HikariDataSource jdbc-url: 
jdbc:mysql://localhost:3306/zc?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useLegacyDatetimeCode=false&serverTimezone=UTC
 driver-class-name: com.mysql.cj.jdbc.Driver username: root password: root # 
规则配置 rules: sharding: tables: # 逻辑表名称 device_log: # 行表达式标识符可以使用 ${...} 或 
$->{...},但前者与 Spring 本身的属性文件占位符冲突,因此在 Spring 环境中使用行表达式标识符建议使用 $->{...} 
actual-data-nodes: zc.device_log_$->{1..3} # 分表策略 table-strategy: standard: # 
分片列名称 sharding-column: company_code # 分片算法名称 sharding-algorithm-name: 
table-inline # 表主�
 �算法
   > 
   > # key-generate-strategy:
   > # column: id
   > # key-generator-name: snowflake
   > ```
   > # 分片算法配置
   > sharding-algorithms:
   >   table-inline:
   >     # 分片算法类型
   >     type: INLINE
   >     props:
   >       # 分片算法的行表达式
   >       algorithm-expression: device_log_$->{company_code}
   > ```
   
   > jpa: database: mysql database-platform: 
org.hibernate.dialect.MySQL57Dialect hibernate: ddl-auto: update properties: 
hibernate: jdbc: time_zone: UTC messages: encoding: UTF-8
   > 
   > 请问 假如我要再多一个表进行分表 ,如何配置呀?
   
   


-- 
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: [email protected]

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


Reply via email to