Spring Boot Multi-Database Configuration: Connecting to Multiple MySQL Databases Multiple datasource

preview_player
Показать описание
In this tutorial, we'll explore how to configure a Spring Boot application to connect to multiple MySQL databases.

You'll learn how to set up data source configurations for each database, define entity classes, and create repositories to perform database operations. We'll also cover how to handle transactions and manage multiple data sources efficiently. Whether you're building a microservices architecture or need to work with multiple databases in a single application, this video will provide you with the essential knowledge and step-by-step guidance to seamlessly connect your Spring Boot application to multiple MySQL databases. Don't forget to like and subscribe for more in-depth Java and Spring tutorials!

#multipledatasource #springbootmysql #playjava
Рекомендации по теме
Комментарии
Автор

I am getting below error. Any idea?
Your input is greatly appreciated.

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

VinodhNBK
Автор

How to auto create table I have used spring.jpa.generate-ddl=true but it s not working

revanthgoud
Автор

Connect with two different databases i.e. mysql &postgreSQL

razatech
Автор

I was able to resolve the previous error.
However, when i try to make API call, I see null values are getting added in the table except the ID column. Any idea where I am doing wrong?

VinodhNBK
Автор

Why the tables are not generated automatically?

pranoydas