azui007 opened a new issue, #18651:
URL: https://github.com/apache/shardingsphere/issues/18651
## Question
# environment:
Sharding-JDBC 5.1.1
I have two databases(test1,test2), test1 save company A , test2 save
company B。
Both databases have the same tables: **company_info1 - company_info1000**
# current configuration:
```
spring:
shardingsphere:
enabled: true
props:
sql-show: true
datasource:
names: test2,test1
test1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
url:
jdbc:postgresql://localhost:5432/test1?useUnicode=true&characterEncoding=UTF-8
username: postgres
password: postgres
test2:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
url:
jdbc:postgresql://localhost:5432/test2?useUnicode=true&characterEncoding=UTF-8
username: postgres
password: postgres
rules:
sharding:
sharding-algorithms:
database-inline:
type: CLASS_BASED
props:
strategy: standard
algorithmClassName:
com.aaa.bbb.sharedingpheredemo.algorith.CompanyCodePreciseShardingAlgorithm
tables:
company_info1:
actual-data-nodes: test$->{1..2}.company_info1
database-strategy:
standard:
sharding-column: company_code
sharding-algorithm-name: database-inline
company_info2:
actual-data-nodes: test$->{1..2}.company_info2
database-strategy:
standard:
sharding-column: company_code
sharding-algorithm-name: database-inline
default-database-strategy:
standard:
sharding-column: company_code
sharding-algorithm-name: database-inline
```
# Question
I configure sharding database rules for all tables , not need to configuring
company_info1 to company_info1000 tables。
I try uesd **default-database-strategy**,but it not work for me.
can you help me
thank you
--
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]