One way to solve this problem without adding the many complexities of data sources would be to create two different spring profiles (one for each data source), and then run 2 instances of the application, one with each spring. profile. Read the data from one, then pass the data to the second (via REST or something else) to insert it. It also creates reusable services for each data source if you need access elsewhere.
There are ways to use sources with multiple data, but I always thought that they were too complex for what I needed.
source
share