Java Spring Boot - Connect dynamic multiple Database
<p>I'm confused about how to connect Spring  dynamically to multiple databases, depending on the request?
For Example : <br>
1. In admin site, register new member. <br>
2. Database admin creates a new database for this new member.<br>
3. Spring boot .jar, when in run mode, just adds some configuration lines  to the external file, this service can connect to the new added database.</p>

<p>member 1 has url 1 => www.example.com/member-1 connect to db_member_1<br>
member 2 has url 2 => www.example.com/member-2 connect to db_member_2<br>
... etc</p>

<p>So I mean, I don't need to update my source code, but just add some lines in my external configuration file,so this spring boot .jar can connect to the new database.
I have tried connect two databases in 1 spring boot but I don't know how to make it dynamically without unloading my spring boot.
I use JPA to connect my master database and use JdbcTemplate to connect my transaction database.</p>

<p>Thanks in advance. :)</p>

<p>Regards,</p>

<p>Peter Susanto</p>