MrXionGe commented on issue #8306:
URL: https://github.com/apache/shardingsphere/issues/8306#issuecomment-732794871
@yu199195
Thanks a lot!
## Config Example 1
```
spring.shardingsphere.datasource.names=ds_0,ds_1
spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://127.0.0.1:3306/db_master?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
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=web_app
spring.shardingsphere.datasource.ds_0.password= 123456
spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://127.0.0.1:3306/db_read?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
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=web_app
spring.shardingsphere.datasource.ds_1.password= 123456
spring.shardingsphere.rules.replica-query.load-balancers.round-robin.type=ROUND_ROBIN
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.primary-data-source-name=ds_0
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.replica-data-source-names=ds_01
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.load-balancer-name=round-robin
```
## Config Example 2
```
spring.shardingsphere.datasource.names=ds_0,ds_1
spring.shardingsphere.datasource.common.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.common.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.common.username=web_app
spring.shardingsphere.datasource.common.password= 123456
spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://127.0.0.1:3306/db_master?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
spring.shardingsphere.datasource.ds_1.jdbc-url=jdbc:mysql://127.0.0.1:3306/db_read?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
spring.shardingsphere.rules.replica-query.load-balancers.round-robin.type=ROUND_ROBIN
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.primary-data-source-name=ds_0
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.replica-data-source-names=ds_01
spring.shardingsphere.rules.replica-query.data-sources.pr_ds.load-balancer-name=round-robin
```
I tried the above two examples and failed. The same 'Exception Message'
#### pom.xml
```
<!-- sharding-jdbc -->
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0-alpha</version>
</dependency>
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]