MultiTenant: AbstractRoutingDataSource vs MultiTenantConnectionProvider
What is the best approach implementing MultiTenant (in my case for a separate DATABASE script).
- Spring focus on AbstractRoutingDataSource
- Hibernate focuses on MultiTenantConnectionProvider and CurrentTenantIdentifierResolver
I have used AbstractRoutingDataSources using the SpringSecurityContext session variable to look up the tenant ID, but only because it seems to be simpler than the Hibernate approach.
I would like to receive information on whether this option was correct or whether it is better to use another.
+3
source to share
No one has answered this question yet
Check out similar questions: