DEV Community

Discussion on: Spring Boot 2 with Multiple DataSources

Collapse
 
uttam_pawar profile image
Uttamp143

How to read/write data in multiple datasource using single repository ?
e.g Suppose there are 2 customers i.e customer1 and customer2
There are different data source as customerDb1 and customerDb2
Now for customer1 should go in customerDb1 and for customer2 in customerDb2
but jpa repository will be same i.e customerRepository.