This is an automated email from the ASF dual-hosted git repository. zhaojinchao 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 b3690bd5ef3 Optimize sharding sample project database connections and profiles (#16583) b3690bd5ef3 is described below commit b3690bd5ef3fb022b56a1464019db3400424c7ce Author: 龙台 Long Tai <77398366+acme...@users.noreply.github.com> AuthorDate: Mon Apr 4 18:38:00 2022 +0800 Optimize sharding sample project database connections and profiles (#16583) --- .../main/resources/application-sharding-auto-tables.properties | 8 ++++---- .../resources/application-sharding-databases-tables.properties | 8 ++++---- .../src/main/resources/application-sharding-databases.properties | 8 ++++---- .../src/main/resources/application-sharding-tables.properties | 4 ++-- .../src/main/resources/application.properties | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-auto-tables.properties b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resour [...] index fae2f177866..3d26fc6e110 100644 --- a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-auto-tables.properties +++ b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-auto-tables.properties @@ -17,17 +17,17 @@ spring.shardingsphere.datasource.names=ds-0,ds-1 -spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-0.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-0.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-0.username=root -spring.shardingsphere.datasource.ds-0.password=123456 +spring.shardingsphere.datasource.ds-0.password= -spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-1.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-1.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-1.username=root -spring.shardingsphere.datasource.ds-1.password=123456 +spring.shardingsphere.datasource.ds-1.password= 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 diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases-tables.properties b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/r [...] index 1a80df4d38c..7e9ecb10c88 100644 --- a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases-tables.properties +++ b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases-tables.properties @@ -21,17 +21,17 @@ spring.shardingsphere.mode.overwrite=true spring.shardingsphere.datasource.names=ds-0,ds-1 -spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-0.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-0.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-0.username=root -spring.shardingsphere.datasource.ds-0.password=123456 +spring.shardingsphere.datasource.ds-0.password= -spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-1.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-1.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-1.username=root -spring.shardingsphere.datasource.ds-1.password=123456 +spring.shardingsphere.datasource.ds-1.password= spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=user_id spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=datasource-class-based diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases.properties b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resource [...] index a18aab8c2b2..b5fe9420dae 100644 --- a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases.properties +++ b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-databases.properties @@ -17,17 +17,17 @@ spring.shardingsphere.datasource.names=ds-0,ds-1 -spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-0.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-0.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-0.username=root -spring.shardingsphere.datasource.ds-0.password=123456 +spring.shardingsphere.datasource.ds-0.password= -spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds-1.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds-1.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds-1.username=root -spring.shardingsphere.datasource.ds-1.password=123456 +spring.shardingsphere.datasource.ds-1.password= spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-column=user_id spring.shardingsphere.rules.sharding.default-database-strategy.standard.sharding-algorithm-name=datasource-class-based diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-tables.properties b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/a [...] index 16783e9518a..905dea99f7b 100644 --- a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-tables.properties +++ b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application-sharding-tables.properties @@ -21,9 +21,9 @@ spring.shardingsphere.datasource.names=ds spring.shardingsphere.datasource.ds.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds.driver-class-name=com.mysql.jdbc.Driver -spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://192.168.58.129:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 spring.shardingsphere.datasource.ds.username=root -spring.shardingsphere.datasource.ds.password=123456 +spring.shardingsphere.datasource.ds.password= spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds.t_order_$->{0..1} spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id diff --git a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application.properties b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application.properties index e45cce19eb9..7b1c953e881 100644 --- a/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application.properties +++ b/examples/shardingsphere-jdbc-example/single-feature-example/extension-example/custom-sharding-algortihm-example/class-based-sharding-algorithm-example/class-based-sharding-spring-boot-mybatis-example/src/main/resources/application.properties @@ -19,5 +19,5 @@ mybatis.config-location=classpath:META-INF/mybatis-config.xml spring.profiles.active=sharding-databases-tables #spring.profiles.active=sharding-tables -#spring.profiles.active=sharding-databases-tables +#spring.profiles.active=sharding-databases #spring.profiles.active=sharding-auto-tables