1
How do spring keep tenantID present in all requests? I would like to point out that my idea for using multitenant would be as follows www.nomeDoSistema.com.br/nomeDaEmpresa/
and for each company name the system will fix a single bank for this customer.
How can I do that?
This is my daily handling problem. Unfortunately I just shut down the computer to give the guidelines. Generally speaking, I have a
TenantRoutingDatasource
Hikaicp managing the tenant route to theDatasource
. I keep thetenant
in aThreadLocal
properly encapsulated and have aFilter
that will set the appropriate tenant.– Jefferson Quesado
Take a look at this article and see if it helps your problem: https://medium.com/@joeclever/using-Multiple-datasources-with-spring-boot-and-spring-data-6430b00c02e7
– Diego Biazin