What is best for configuring Hibernate-Spring for multiple database relationships?

We have the main mysql database, for which all applications in our organization need data in this database. How can I configure my java application to use this database with this particular database when I use Spring and Hibernate in my application? How do I set up JPA annotations, for example, between the CONTRACT table in my database and the COUNTRY table in our main database? What is the best practice for this?

+3
source share
1 answer

The best practice is not to use multiple databases.

2 DataSource SessionFactory/EntityManagerFactory + persistnece, , .

:

+3

Source: https://habr.com/ru/post/1740101/


All Articles