Loading sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/resources/META-INF/etcd/local/application-sharding-master-slave.xml +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding" xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave" xmlns:orchestraion="http://shardingsphere.apache.org/schema/shardingsphere/orchestration" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd Loading @@ -30,6 +31,8 @@ http://www.springframework.org/schema/tx/spring-tx.xsd http://shardingsphere.apache.org/schema/shardingsphere/sharding http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://shardingsphere.apache.org/schema/shardingsphere/masterslave http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://shardingsphere.apache.org/schema/shardingsphere/orchestration http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd"> <import resource="classpath*:META-INF/etcd/registry-center.xml" /> Loading Loading @@ -76,11 +79,10 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" /> <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" /> <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <sharding:data-source id="realShardingMasterSlaveDataSource"> <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1"> Loading sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/resources/META-INF/zookeeper/local/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="realMasterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> <orchestraion:master-slave-data-source id="masterSlaveDataSource" data-source-ref="realMasterSlaveDataSource" registry-center-ref="regCenter" overwrite="true" /> Loading sharding-jdbc-example/sharding-example/sharding-spring-namespace-jpa-example/src/main/resources/META-INF/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> </beans> sharding-jdbc-example/sharding-example/sharding-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-master-slave.xml +5 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding" xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context Loading @@ -12,7 +13,9 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://shardingsphere.apache.org/schema/shardingsphere/sharding http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd"> http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://shardingsphere.apache.org/schema/shardingsphere/masterslave http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd"> <context:annotation-config /> <context:component-scan base-package="org.apache.shardingsphere.example.common.jpa"/> Loading Loading @@ -81,8 +84,7 @@ <property name="maximumPoolSize" value="16"/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" /> <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" /> <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" /> Loading sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-example/src/main/resources/META-INF/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,7 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> Loading Loading
sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/resources/META-INF/etcd/local/application-sharding-master-slave.xml +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding" xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave" xmlns:orchestraion="http://shardingsphere.apache.org/schema/shardingsphere/orchestration" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd Loading @@ -30,6 +31,8 @@ http://www.springframework.org/schema/tx/spring-tx.xsd http://shardingsphere.apache.org/schema/shardingsphere/sharding http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://shardingsphere.apache.org/schema/shardingsphere/masterslave http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd http://shardingsphere.apache.org/schema/shardingsphere/orchestration http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd"> <import resource="classpath*:META-INF/etcd/registry-center.xml" /> Loading Loading @@ -76,11 +79,10 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" /> <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" /> <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_item_id" algorithm-expression="t_order_item_${order_item_id % 2}" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <sharding:data-source id="realShardingMasterSlaveDataSource"> <sharding:sharding-rule data-source-names="demo_ds_master_0,demo_ds_master_0_slave_0,demo_ds_master_0_slave_1,demo_ds_master_1,demo_ds_master_1_slave_0,demo_ds_master_1_slave_1"> Loading
sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/resources/META-INF/zookeeper/local/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="realMasterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> <orchestraion:master-slave-data-source id="masterSlaveDataSource" data-source-ref="realMasterSlaveDataSource" registry-center-ref="regCenter" overwrite="true" /> Loading
sharding-jdbc-example/sharding-example/sharding-spring-namespace-jpa-example/src/main/resources/META-INF/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> </beans>
sharding-jdbc-example/sharding-example/sharding-spring-namespace-jpa-example/src/main/resources/META-INF/application-sharding-master-slave.xml +5 −3 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding" xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context Loading @@ -12,7 +13,9 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://shardingsphere.apache.org/schema/shardingsphere/sharding http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd"> http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd http://shardingsphere.apache.org/schema/shardingsphere/masterslave http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd"> <context:annotation-config /> <context:component-scan base-package="org.apache.shardingsphere.example.common.jpa"/> Loading Loading @@ -81,8 +84,7 @@ <property name="maximumPoolSize" value="16"/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="demo_ds_ms_${user_id % 2}" /> <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 2}" /> <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 2}" /> Loading
sharding-jdbc-example/sharding-example/sharding-spring-namespace-mybatis-example/src/main/resources/META-INF/application-master-slave.xml +1 −2 Original line number Diff line number Diff line Loading @@ -35,8 +35,7 @@ <property name="password" value=""/> </bean> <bean id="randomStrategy" class="org.apache.shardingsphere.core.strategy.masterslave.RandomMasterSlaveLoadBalanceAlgorithm" /> <master-slave:load-balance-algorithm id="randomStrategy" type="RANDOM" /> <master-slave:data-source id="masterSlaveDataSource" master-data-source-name="demo_ds_master" slave-data-source-names="demo_ds_slave_0, demo_ds_slave_1" strategy-ref="randomStrategy" /> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> Loading