All,
Is it possible to connect 2 different database (1. RDBMS using Hibernate and 2. MongoDB) using Spring-Data from a single application?
In our application, we would like to deliver images from MongoDB along with the other relational data from MySQL using Hibernate.
I would appreciate all your help.
Thanks
Yes it's possible.
You can have both JPA and Mongo repositories in the same application.
<mongo:repositories base-package="your.package.repository.mongo"/>
<jpa:repositories base-package="your.package.repository.jpa" />
There's nothing preventing you from using any type of repository combination you'd like.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.