Spring Boot : How to connect with multiple databases using Spring Data JPA
#springboot #multipledatabases #springdatajpa
In this video you can learn how to develop spring boot application which can connect with multiple databases using Spring Data JPA.
In the application we have configured below 2 databases.
Database-1 : Embedded H2 Database
Database-2 : MySQL Database (AWS RDS)
👉 Source Code Git Hub Link : github.com/ashokitschool/spri...
✍️✍️ Register Here For Online Training : bit.ly/3Crpgbr
✍️ ✍️ Join Here For Technical Discussions : bit.ly/3iP2KyA
📞 WhatsApp Us : wa.me/+919985396677
💡 Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.
💡 Visit Our Website
For Online Training: ashokitech.com/
☎ WhatsApp Number: wa.me/+919985396677
💡 About Ashok IT :
Ashok IT is the No.1 quality training institute in India for the candidates who want to build their future in Information Technology. We are into online training, class room training, corporate training and one to one training with more passion and dedication. Ashok IT aims in providing best quality realtime oriented trainings on C, C++, Java, Spring , Spring REST, Spring Cloud, Microservices, Python, DJango, .Net, Angular, React JS, Salesforce, , Testing, Android, Docker, Kubernates, Manual Testing, Selenium and Digital Marketing.
-----------------------------------------------------------------------------------
💡 Our Online Training Features
🎈 Training with Real-time Working Professionals
🎈 Industry Matching use cases
🎈 Live Coding
🎈 Real-time Environment
🎈 Class Notes
🎈 Doubts Clarifications in Each Session
-----------------------------------------------------------------------------------
💡 Contact details:
☎ WhatsApp Number: wa.me/+919985396677
► Website : ashokitech.com/
► Join with us in Telegram : bit.ly/3iP2KyA
► Like us in Facebook : bit.ly/38riDKn
► Follow us in Instagram : bit.ly/3jzEKl8
► Follow us in Twitter : bit.ly/3N85pkw
#howtoconnectwithmultipledatabasesusingspringboot
#howtoconfiguremultipledatasourcesinspringboot
#springboottutorial #springbootfullcourse #springdatajpa
#java #programming #applicationdevelopment #databases #sql #nosql
Пікірлер: 49
💡 Welcome to Ashok IT..!! 💡 👉 Register Here For Online Training : bit.ly/3Crpgbr 🔥 Download Android App : bit.ly/3Z2vXcO 🔥 Download IOS App (MyInstitute) : apple.co/3IcEao3 👉 ORG Code For IOS : CNFXJ 🌐 Visit Our Website : ashokitech.com/
Short. Precise. To the point. Great job!
Well organised content. Clear explaination steps. Gotcha in first view itself.
Sir simply superb great sir within 4 minutes' you completed. Thanqq soo much for sharing this video
@ashokit
Жыл бұрын
You're Welcome 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
Thanks Sir ! very clear and a good explain Wow !!!
@ashokit
Жыл бұрын
Most welcome!
You are the genuine Java trainer Sir. Others focusing to earn but your content is worthful
@ashokit
9 ай бұрын
Thank You 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
i can't believe there are so less views and likes on this video, soon it will cross millions
@ashokit
Жыл бұрын
Thank You 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
Very good.and easily understand.thank yoy
@ashokit
4 ай бұрын
You are welcome
Awesome bro
@ashokit
Жыл бұрын
Thankyou...
Hello Ashok, i have a problem statement - suppose i want to use 2 rdbms database one as primary and other as backup database so if i want to persist all entities to both database and retrieve the data only from primary database via repository how to configure, can you please help.
Thanks alot!
@ashokit
9 ай бұрын
You're Welcome 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
Can you please highlight how Transactions would work?
Thank you
@ashokit
Жыл бұрын
You're Welcome 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
you are good
@ashokit
8 ай бұрын
Thank You 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
You are writing in spring boot 2.x application?
Problem is i am able to connect using this but using connection pool i am unable to do it using jndi-name
Ashok sir, if db1 table wants to use db2 tables or suppose to join db1 table to db2 wht would be solution for that
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
dataSource or dataSourceClassName or jdbcUrl is required. ??
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
Very good explanation but username and password hard coded values how to do secret
Why @primary is used in db1 configuration class and not in db2 congratulation class
Do you have git hub link please?
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
sir can you please share code here. getting compilation errors while creating Builder object
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
I tried your solution but you don't show what's in the entities package. Other classes are also hidden. Do you have a github link where we can get this code and try this? Without the link, the solution doesn't help.
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
@lukamaletic9557
11 ай бұрын
Did you get the code? I was waiting for several days, but nothing...
I have an issue, my application can not find the EntityManagerFacotyBuilder
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
Not working... showing cycle dependency
This should not work as there are conflicting names used. Same name used in the same Spring Context in multiple places. Application (Spring framework) will present an error and would not start.
I Tried this already but what if my database is totally dynamic and i need to switch the database in runtime? For example my conn info comes from my admin table where all my clients database conn info are stored. Which ever client uses the appplication it should switch the database on runtime. I was not able to acheive this using dynamic datasource routing and stuffs. Can you help me with that ?
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
In case of same class name , User which is defined in two different com.ashokit.read.User Another one is com.ashokit.write.User In this case database understand which User class to use
can you show Respository classes ?
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj
I'm getting this error Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sourceEntityManagerFactory' defined in class path resource [com/example/ecommerceh/configuration/SourceDataConfig.class]: Unsatisfied dependency expressed through method 'sourceEntityManagerFactory' parameter 0: No qualifying bean of type 'org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
@ashokit
Жыл бұрын
Please Contact Our Admin Team:wa.me/+919985396677 👉 Subscribe To Our KZread Channel: bit.ly/41IHJdj