Thanks for reading the article.
multitenancy:
dataSources:
-
tenantId: tenant_1
url: jdbc:postgresql://172.16.69.133:5432/tenant_1
username: u1
password: changeit
driverClassName: org.postgresql.Driver
-
tenantId: tenant_2
url: jdbc:postgresql://172.16.69.133:5532/tenant_2
username: u2
password: changeit
driverClassName: org.postgresql.Driver
You can use the above datasource configuration in TenantDatasource class to create a map of all the datasources.