skyjilygao opened a new issue #8627:
URL: https://github.com/apache/shardingsphere/issues/8627


   ## Question
   
   参考一下信息配置了多数据源,发现如果不同数据库的表都很多情况下,需要在`tables`为每个表都需要指定使用哪个数据源。有没有更方便的方式??
   ```yaml
   spring:
     shardingsphere:
       props:
         sql:
           show:
             true
       datasource:
         names: ds1,ds2,ds3
         ds1:
           ...忽略...
         ds2:
           ...忽略...
         ds3:
           ...忽略...
   
       sharding:
         default-data-source-name: ds1
         default-database-strategy:
           hint:
             algorithm-class-name: 
cn.skyjilygao.study.shardingsphere.multidatasource.shardingsphere.MyDatasourceRoutingAlgorithm
         tables:
   #        user:
   #          actualDataNodes: ds1.user
           order:
             actualDataNodes: ds2.order
           bc_admin_users:
             actualDataNodes: ds3.bc_admin_users
         defaultTableStrategy:
           none:
             any: ""
   ```
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   


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


Reply via email to