I have two databases that have the exact same tables. They have the same model. I want to create a simple Spring Boot application that will copy some records from one DB to the other. Both DBs are form the same vendor.
Ideally I would like to have one domain model and simply assign the adequate datasource based on my needs, possibly through the @Qualified annotation.
Another workaround would be to duplicate the domain model and create two configurations for each database.
What is the correct way of solving this problem?
Thank you in advance