1
In my application, customers have their own database and I am developing a REST application, with Spring Boot, from which I need to configure Datasources to connect to databases, according to a Pathparam URL, in Runtime.
Someone knows how to do it?
I researched about Abstractroutingdatasource and Multi-tenant, but I could not understand how it works very well.
If anyone can help me... even to give me a north hehe, so I can implement all this correctly :)
Thank you in advance!
Diego, thank you so much for answering. But in this case that you described, I would have the databases already pre-defined, right? However, in the actual case of my application, each client has its own database, that is, if I register a new client, a BD will be generated for it as well. Hence, the loading of these data would have to be dynamic
– Paulo Augusto
@Pauloaugusto - I think I understand what you need. Look at this video that talks about the Multitenancy Implementation by Hibernate schema from Algaworks: link
– Diego Aguiar