Configure Multiple (Routing) Datasources (Per User) | MySQL + MSSQL Spring Data / Spring Boot

Опубликовано: 22 Октябрь 2024
на канале: Cyecize
1,097
35

This video is about configuring Spring Data to work with multiple data sources where the user can provide credentials to connect to his own database. Also, the possibility for Spring Data to work with multiple different SQL dialects.
In this specific example the application is working with MySQL and Microsoft SQL Server at the same time.
I use Flyway to create databases and also validate existing databases whether they are compatible with the application.

Here's the code from the video:
https://github.com/Cyecize/Spring-Dat...

Timecodes
0:00 - Intro
1:06 - Overview of the Application
6:28 - POM, properties and project structure
7:41 - Custom Session Management
11:14 - Managing DB Connections
21:19 - Configure Spring to Switch Connections
29:29 - Final Thoughts