xiaotong2019 commented on issue #19769:
URL:
https://github.com/apache/shardingsphere/issues/19769#issuecomment-1204673445
> What is your configuration?
Thanks, Such as:
`server.port=8080
mybatis-plus.mapper-locations=classpath:mybatis/**/*.xml
mybatis-plus.type-aliases-package=com.catfish.**.domain
mybatis-plus.configuration.map-underscore-to-camel-case=true
spring.shardingsphere.enabled=true
spring.shardingsphere.mode.type=Memory
spring.shardingsphere.props.sql-show=true
spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
spring.shardingsphere.rules.sharding.key-generators.snowflake.props.worker-id=123
spring.shardingsphere.datasource.names=ds0,ds1
spring.shardingsphere.datasource.ds0.jdbc-url=jdbc:mysql://localhost:3306/ds0?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=UTF-8
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.username=root
spring.shardingsphere.datasource.ds0.password=root1234
spring.shardingsphere.datasource.ds0.minimum-idle=2
spring.shardingsphere.datasource.ds0.maximum-pool-size=5
spring.shardingsphere.datasource.ds1.jdbc-url=jdbc:mysql://localhost:3306/ds1?serverTimezone=GMT%2B8&useSSL=false&useUnicode=true&characterEncoding=UTF-8
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.username=root
spring.shardingsphere.datasource.ds1.password=root1234
spring.shardingsphere.datasource.ds1.minimum-idle=2
spring.shardingsphere.datasource.ds1.maximum-pool-size=5
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds$->{0..1}.t_order_$->{0..1}
spring.shardingsphere.rules.sharding.tables.t_order_item.actual-data-nodes=ds$->{0..1}.t_order_item_$->{0..1}
spring.shardingsphere.rules.sharding.tables.t_user.actual-data-nodes=ds$->{0..1}.t_user_$->{0..1}
spring.shardingsphere.rules.sharding.binding-tables=t_order,t_order_item
spring.shardingsphere.rules.sharding.broadcast-tables=t_dict
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.key-generator-name=snowflake
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.column=item_id
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.key-generator-name=snowflake
spring.shardingsphere.rules.sharding.tables.t_user.key-generate-strategy.column=user_id
spring.shardingsphere.rules.sharding.tables.t_user.key-generate-strategy.key-generator-name=snowflake
spring.shardingsphere.rules.sharding.tables.t_dict.key-generate-strategy.column=id
spring.shardingsphere.rules.sharding.tables.t_dict.key-generate-strategy.key-generator-name=snowflake
spring.shardingsphere.rules.sharding.tables.t_order.database-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.database-strategy.standard.sharding-algorithm-name=db-order
spring.shardingsphere.rules.sharding.tables.t_order_item.database-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order_item.database-strategy.standard.sharding-algorithm-name=db-order
spring.shardingsphere.rules.sharding.tables.t_user.database-strategy.standard.sharding-column=user_id
spring.shardingsphere.rules.sharding.tables.t_user.database-strategy.standard.sharding-algorithm-name=db-user
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=tb-order
spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-algorithm-name=tb-order-item
spring.shardingsphere.rules.sharding.tables.t_user.table-strategy.standard.sharding-column=user_id
spring.shardingsphere.rules.sharding.tables.t_user.table-strategy.standard.sharding-algorithm-name=
tb-user
spring.shardingsphere.rules.sharding.sharding-algorithms.db-order.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.db-order.props.algorithm-expression=ds$->{
order_id % 2 }
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-order.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-order.props.algorithm-expression=t_order_$->{
order_id % 2 }
spring.shardingsphere.rules.sharding.sharding-algorithms.db-order-item.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.db-order-item.props.algorithm-expression=ds$->{
order_id % 2 }
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-order-item.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-order-item.props.algorithm-expression=t_order_item_$->{
order_id % 2 }
spring.shardingsphere.rules.sharding.sharding-algorithms.db-user.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.db-user.props.algorithm-expression=ds$->{
user_id % 2 }
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-user.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.tb-user.props.algorithm-expression=t_user_$->{
user_id % 2 }
`
--
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]