You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/08/16 08:33:44 UTC
[shardingsphere] branch master updated: fixed (#11843)
This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 7f64089 fixed (#11843)
7f64089 is described below
commit 7f640894fa01c3e64302f574470edcd5cceb5c53
Author: zhaojinchao <33...@users.noreply.github.com>
AuthorDate: Mon Aug 16 16:33:08 2021 +0800
fixed (#11843)
---
...plication-sharding-readwrite-splitting.properties | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/examples/shardingsphere-jdbc-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties b/examples/shardingsphere-jdbc-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
index e78c419..9f9f6c9 100644
--- a/examples/shardingsphere-jdbc-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
+++ b/examples/shardingsphere-jdbc-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-readwrite-splitting.properties
@@ -53,21 +53,22 @@ spring.shardingsphere.datasource.write-ds-1-read-1.driver-class-name=com.mysql.j
spring.shardingsphere.datasource.write-ds-1-read-1.username=root
spring.shardingsphere.datasource.write-ds-1-read-1.password=
-spring.shardingsphere.rules.sharding.default-database-strategy.inline.sharding-column=user_id
-spring.shardingsphere.rules.sharding.default-database-strategy.inline.algorithm-expression=ds-$->{user_id % 2}
+spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=user_id
+spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=database-inline
+
spring.shardingsphere.rules.sharding.binding-tables=t_order,t_order_item
spring.shardingsphere.rules.sharding.broadcast-tables=t_address
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds-$->{0..1}.t_order_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_$->{order_id % 2}
+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=t-order-inline
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.actual-data-nodes=ds-$->{0..1}.t_order_item_$->{0..1}
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
-spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_$->{order_id % 2}
+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=t-order-item-inline
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.column=order_item_id
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.key-generator-name=snowflake
@@ -75,6 +76,13 @@ spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.k
spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
spring.shardingsphere.rules.sharding.key-generators.snowflake.props.worker-id=123
+spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.type=INLINE
+spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.props.algorithm-expression=ds-$->{user_id % 2}
+spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.type=INLINE
+spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-inline.props.algorithm-expression=t_order_$->{order_id % 2}
+spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.type=INLINE
+spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-inline.props.algorithm-expression=t_order_item_$->{order_id % 2}
+
spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.write-data-source-name=write-ds-0
spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.read-data-source-names=write-ds-0-read-0, write-ds-0-read-1
spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-1.write-data-source-name=write-ds-1