Spring Boot : How to connect with multiple databases using Spring Data JPA

Spring Boot : How to connect with multiple databases using Spring Data JPA

Ashok IT

1 год назад

61,291 Просмотров

#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 : https://github.com/ashokitschool/springboot_multi_db_config.git

✍️✍️ Register Here For Online Training : https://bit.ly/3Crpgbr

✍️ ✍️ Join Here For Technical Discussions : https://bit.ly/3iP2KyA

📞 WhatsApp Us : https://wa.me/+919985396677

💡 Subscribe to our channel and hit the bell 🔔🔔🔔 icon to get video updates.

💡 Visit Our Website
For Online Training: https://ashokitech.com/

☎ WhatsApp Number: https://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: https://wa.me/+919985396677
► Website : https://ashokitech.com/
► Join with us in Telegram : https://bit.ly/3iP2KyA
► Like us in Facebook : https://bit.ly/38riDKn
► Follow us in Instagram : https://bit.ly/3jzEKl8
► Follow us in Twitter : https://bit.ly/3N85pkw

#howtoconnectwithmultipledatabasesusingspringboot
#howtoconfiguremultipledatasourcesinspringboot
#springboottutorial #springbootfullcourse #springdatajpa
#java #programming #applicationdevelopment #databases #sql #nosql

Тэги:

#springboot #spring_data_jpa #multiple_databases_connection_using_spring_boot #how_to_configure_multiple_databases_in_spring_boot #spring_data_jpa_with_multiple_databases_connection #spring_boot_with_data_jpa_tutorial #spring_boot_application_development #how_to_configure_multiple_data_sources #how_to_connect_with_multiple_databases_using_spring_boot #spring_boot_with_mysql_database_example #spring_boot_with_h2_database_example #ashokit #ashok_it #ashokit_spring_boot #microservices
Ссылки и html тэги не поддерживаются


Комментарии:

Luis Enrique Gonzalez
Luis Enrique Gonzalez - 19.10.2023 23:12

you are good

Ответить
Anand Nandudkar
Anand Nandudkar - 16.10.2023 11:40

Thanks alot!

Ответить
Rajendra Naik
Rajendra Naik - 29.09.2023 09:58

You are the genuine Java trainer Sir.
Others focusing to earn but your content is worthful

Ответить
RLakhan
RLakhan - 25.08.2023 15:29

Can you please highlight how Transactions would work?

Ответить
Eternal gaming
Eternal gaming - 01.08.2023 18:44

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.

Ответить
pranit pawar
pranit pawar - 20.07.2023 06:22

Thank you

Ответить
Nguyễn Minh Hiếu
Nguyễn Minh Hiếu - 09.07.2023 17:48

I have an issue, my application can not find the EntityManagerFacotyBuilder

Ответить
Daniel Claire
Daniel Claire - 07.07.2023 00:01

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.

Ответить
Gangadhar j
Gangadhar j - 24.06.2023 10:20

can you show Respository classes ?

Ответить
Mayuresh Sohani
Mayuresh Sohani - 09.06.2023 14:18

sir can you please share code here. getting compilation errors while creating Builder object

Ответить
Deepak Pareek
Deepak Pareek - 16.05.2023 10:12

Ashok sir, if db1 table wants to use db2 tables or suppose to join db1 table to db2 wht would be solution for that

Ответить
Shashank Bhattarai
Shashank Bhattarai - 13.05.2023 04:44

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 ?

Ответить
AI GYAN
AI GYAN - 12.05.2023 05:52

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: {}

Ответить
Kannadasan Karuppaiyan
Kannadasan Karuppaiyan - 30.03.2023 19:12

Awesome bro

Ответить
Alison Walker
Alison Walker - 22.03.2023 03:27

dataSource or dataSourceClassName or jdbcUrl is required. ??

Ответить
Pratik Jha
Pratik Jha - 15.03.2023 08:25

i can't believe there are so less views and likes on this video, soon it will cross millions

Ответить
Mohamed
Mohamed - 20.02.2023 05:10

Thanks Sir ! very clear and a good explain Wow !!!

Ответить
Nguyễn Hồ Việt
Nguyễn Hồ Việt - 15.02.2023 18:22

Do you have git hub link please?

Ответить
Naga Lakshmi
Naga Lakshmi - 26.01.2023 19:28

Sir simply superb great sir within 4 minutes' you completed. Thanqq soo much for sharing this video

Ответить