CINDERALL opened a new issue #15474:
URL: https://github.com/apache/shardingsphere/issues/15474


   ```
   <dependency>
                   <groupId>org.apache.shardingsphere</groupId>
                   
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
                   <version>5.0.0</version>
               </dependency>
   ```
   ```
   spring:
     shardingsphere:
       datasource:
         names: master,slave,master-shop,slave-shop
         master:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://ip:port/db0?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
           username: root
           password: root
         slave:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://ip:port/db0?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
           username: root
           password: root
         master-shop:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://ip:port/db1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
           username: root
           password: root
         slave-shop:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
jdbc:mysql://ip:port/db1?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=false&zeroDateTimeBehavior=convertToNull
           username: root
           password: root
       rules:
         readwrite-splitting:
           data-sources:
             ms0:
               write-data-source-name: master
               read-data-source-names: slave
               load-balancer-name: round-robin
             ms1:
               write-data-source-name: master-shop
               read-data-source-names: slave-shop
               load-balancer-name: round-robin
           load-balancers:
             round-robin:
               type: ROUND_ROBIN
               props:
                 haha: 1
       props:
         sql-show: true
   
   ```
   ```
   @Data
   @EqualsAndHashCode(callSuper = false)
   @Accessors(chain = true)
   @TableName("ms0.order")
   public class Order implements Serializable{
   }
   ```
   
   ds0 and ds1  have tables with the same name. I wanted to select ds0.order, 
but the result is ds1.order
   
![1645093781(1)](https://user-images.githubusercontent.com/9822098/154457991-9c702f4d-4fa0-479f-ad9e-29db23976dfa.jpg)
   


-- 
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]


Reply via email to