Comven opened a new issue #12040:
URL: https://github.com/apache/shardingsphere/issues/12040
shardingsphere-jdbc-core-spring-boot-starter-5.0.0-beta
my configuration is like this
```
spring.shardingsphere.props.sql-show=true
spring.shardingsphere.datasource.names=db1,db1slaver
spring.shardingsphere.datasource.db1.jdbc-url=jdbc:mysql://localhost:3306/sharding_one_master?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&reconnect=true&serverTimezone=Asia/Shanghai
spring.shardingsphere.datasource.db1.username=root
spring.shardingsphere.datasource.db1.password=
spring.shardingsphere.datasource.db1.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.db1.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.db1slaver.jdbc-url=jdbc:mysql://localhost:3306/sharding_one_slaver?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&reconnect=true&serverTimezone=Asia/Shanghai
spring.shardingsphere.datasource.db1slaver.username=root
spring.shardingsphere.datasource.db1slaver.password=
spring.shardingsphere.datasource.db1slaver.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.db1slaver.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.rules.sharding.tables.order_info.actual-data-nodes=db1.order_info_20$->{21..22}0$->{1..9},db1.order_info_20$->{21..22}$->{10..12}
spring.shardingsphere.rules.sharding.tables.order_info.table-strategy.standard.shardingColumn=add_time
spring.shardingsphere.rules.sharding.tables.order_info.table-strategy.standard.shardingAlgorithmName=tbclassbased
# IntervalShardingAlgorithm
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.type=interval
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.datetime-interval-amount=1
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.datetime-interval-unit=Months
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.sharding-suffix-pattern=yyyyMM
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.datetime-pattern=yyyy-MM-dd
HH:mm:ss
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.datetime-lower=2021-06-01
00:00:00
spring.shardingsphere.rules.sharding.sharding-algorithms.tbclassbased.props.datetime-upper=2021-08-31
23:59:59
spring.shardingsphere.rules.readwrite-splitting.dataSources.dbgroup.writeDataSourceName=db1
spring.shardingsphere.rules.readwrite-splitting.dataSources.dbgroup.readDataSourceNames=db1slaver
spring.shardingsphere.rules.readwrite-splitting.dataSources.dbgroup.load-balancer-name=roundRobin
spring.shardingsphere.rules.readwrite-splitting.load-balancers.roundRobin.type=ROUND_ROBIN
```
the `db1` has 7 records, the `db1slaver` has 4 records.
It doesn't work,executing a query statement always returns 7 records. When I
configure it like this
```
spring.shardingsphere.rules.readwrite-splitting.dataSources.db1.writeDataSourceName=db1
spring.shardingsphere.rules.readwrite-splitting.dataSources.db1.readDataSourceNames=db1slaver
spring.shardingsphere.rules.readwrite-splitting.dataSources.db1.load-balancer-name=roundRobin
```
`goup1` change to `db1`, it work fine.
And when I use the Java API to configure it, it also doesn't work unless
`goup1` is replaced by `db1`. what's wrong with my code?
The split table execution is normal, and the read-write separation execution
fails.
--
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]