From 6dee84b0c2509c6e1ec973e8985cbbde171c2bff Mon Sep 17 00:00:00 2001 From: 王彬 Date: Thu, 1 Apr 2021 21:57:25 +0800 Subject: [PATCH] dev_wb --- build.gradle | 4 ++-- src/test/resources/application.properties | 43 ++++++++++++++++++++----------------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index 33a66c0..128bdc0 100644 --- a/build.gradle +++ b/build.gradle @@ -21,9 +21,9 @@ dependencies { compile("org.springframework.boot:spring-boot-starter:2.0.5.RELEASE") compile("org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final") compile('org.springframework:spring-jdbc:5.1.9.RELEASE') - compile('mysql:mysql-connector-java:5.1.47') + compile('mysql:mysql-connector-java:8.0.11') compile('com.alibaba:druid:1.2.4') - compile("org.apache.shardingsphere:shardingsphere-sharding-spring-boot-starter:5.0.0-alpha") + compile("org.apache.shardingsphere:shardingsphere-jdbc-core-spring-boot-starter:5.0.0-alpha") } repositories { diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 088c3f3..7891f56 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -15,7 +15,7 @@ spring.mvc.dispatch-options-request=true # shardingspere spring.shardingsphere.datasource.names=ds0 spring.shardingsphere.datasource.common.type=com.alibaba.druid.pool.DruidDataSource -spring.shardingsphere.datasource.common.driver-class-name=com.mysql.jdbc.Driver +spring.shardingsphere.datasource.common.driver-class-name=com.mysql.cj.jdbc.Driver spring.shardingsphere.datasource.ds0.url=jdbc:mysql://rdsifmezqifmezqo.mysql.rds.aliyuncs.com:3306/bzyun_wxorder?characterEncoding=UTF-8 spring.shardingsphere.datasource.ds0.username=tylife spring.shardingsphere.datasource.ds0.password=lexi365 @@ -24,28 +24,25 @@ spring.shardingsphere.datasource.ds0.max-active=20 spring.shardingsphere.datasource.ds0.min-idle=5 spring.shardingsphere.datasource.ds0.max-wait=60000 -#spring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource -#spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.jdbc.Driver -#spring.shardingsphere.datasource.ds1.url=jdbc:mysql://121.42.142.102:3306/bzyun_wxorder?characterEncoding=UTF-8 -#spring.shardingsphere.datasource.ds1.username=dev -#spring.shardingsphere.datasource.ds1.password=taover02 -#spring.shardingsphere.datasource.ds1.initial-size=10 -#spring.shardingsphere.datasource.ds1.max-active=20 -#spring.shardingsphere.datasource.ds1.min-idle=5 -#spring.shardingsphere.datasource.ds1.max-wait=60000 -# -#spring.shardingsphere.sharding.tables.wxorder_order.actual-data-nodes=ds0.wxorder_order,ds1.wxorder_order -#spring.shardingsphere.sharding.tables.wxorder_order.database-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingDatabaseAlgorithmHint -#spring.shardingsphere.sharding.tables.wxorder_order.table-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingTableAlgorithmHint -#spring.shardingsphere.sharding.tables.wxorder_order.key-generator.column=id -#spring.shardingsphere.sharding.tables.wxorder_order.key-generator.type=SNOWFLAKE-SELF -# -#spring.shardingsphere.sharding.tables.wxorder_order_goods.actual-data-nodes=ds0.wxorder_order_goods -#spring.shardingsphere.sharding.tables.wxorder_order_goods.database-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingDatabaseAlgorithmHint -#spring.shardingsphere.sharding.tables.wxorder_order_goods.table-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingTableAlgorithmHint -#spring.shardingsphere.sharding.tables.wxorder_order_goods.key-generator.column=id -#spring.shardingsphere.sharding.tables.wxorder_order_goods.key-generator.type=SNOWFLAKE-SELF - +spring.shardingsphere.datasource.ds1.url=jdbc:mysql://121.42.142.102:3306/bzyun_wxorder?characterEncoding=UTF-8 +spring.shardingsphere.datasource.ds1.username=dev +spring.shardingsphere.datasource.ds1.password=taover02 +spring.shardingsphere.datasource.ds1.initial-size=10 +spring.shardingsphere.datasource.ds1.max-active=20 +spring.shardingsphere.datasource.ds1.min-idle=5 +spring.shardingsphere.datasource.ds1.max-wait=60000 + +#spring.shardingsphere.rules.sharding.tables.wxorder_order.actual-data-nodes=ds0.wxorder_order +#spring.shardingsphere.rules.sharding.tables.wxorder_order.database-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingDatabaseAlgorithmHint +#spring.shardingsphere.rules.sharding.tables.wxorder_order.table-strategy.hint.algorithm-class-name=com.taover.repository.shardingsphere.ShardingTableAlgorithmHint +#spring.shardingsphere.rules.sharding.tables.wxorder_order.key-generate-strategy.column=id +#spring.shardingsphere.rules.sharding.tables.wxorder_order.key-generate-strategy.key-generator-name=SNOWFLAKE-SELF + +#spring.shardingsphere.rules.sharding.sharding-algorithms.database_inline.type=INLINE +#spring.shardingsphere.rules.sharding.sharding-algorithms.database_inline.props.algorithm-expression=ds_0 +#spring.shardingsphere.rules.sharding.sharding-algorithms.table_inline.type=INLINE +#spring.shardingsphere.rules.sharding.sharding-algorithms.table_inline.props.algorithm-expression=wxorder_order +sql-show=true taover.sharding.workerId=1 taover.sharding.maxVibrationOffset=3 taover.sharding.maxTolerateTimeDifferenceMilliseconds=1000 -- libgit2 0.21.2