'Spring Boot App That Uses Different DB Connections Per User

Which would be the approach or overview idea to be able to let a user switch a DB Connection on runtime ?... For example: User X1 logs into the app and decide he wants to see data from USA environment or another... this would be for a QA environment... is this possible ?. I have a vague idea like disabling autoconfiguration for mongo (in this case) but nothing strong...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source