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

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:

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

Comments are closed.