Am using Mysql database and hibernate in JPA. I have two mysql databases in my project. I want to configure these two databases in configuration class of spring JPA. Already I have configured for one datasource using jpa transaction manager bean. I want to add one more datasource to configure. Please consider below scenario.
Mysql Database db1 -Table 1, Table2, Table3
Mysql Database db2 -Table1, Table2
I want to add jpa configuration for above two sql database. Different connections. Whenever repository interface calls for the particular entity, that database should be get called. Please help anyone on this. Thanks in advance.