Reputation: 144
I have developed a java web application using java, spring webmvc and hibernate. right now it can be used by single organization. I want to convert it to multitenant SaaS application.
I was not able to find material where I can see any example how to convert single tenant application to multi tenant or sample of multitenant application from scratch.
Any help is great.
Upvotes: 2
Views: 3174
Reputation: 7831
Here are a good article for multitenancy Dynamic Multi Tenancy with Spring Boot, Hibernate implementing multitenancy in different ways :
You will face the following problematics :
Configuration values shared OR tenant specific
How to identify a tenant : base on URL, base on query param, based on HEADER, ... : for a request, you can imagine a ThreadLocal or a InheritableThreadLocal to keep the current tenant information.
Data isolation : shared schema, a database per tenant, a schema per tenant
Authentication/Authorization : Same source ? If you have a tool like Keycloak, it can be a realm per tenant
Upvotes: 0
Reputation: 81
It is simple. Only you need to consider few things:
See the Blog SaaS Multi-Tenant application development
Upvotes: 0
Reputation: 3215
Article by Steve Ebersole on Multi-tenancy in Hibernate
Article on how to do it in MySQL 5 Multi-Tenant Strategy for SaaS using MySQL5
From Ibm Securing a multitenant SaaS application with Spring Security, Spring MVC and Apache directory.
SaaS Security PoC - Example Application server
From Wikipedia See Multitenancy
Upvotes: 7