/multitenancy-dynamic-tenant

Spring Boot 2 JPA Hibernate with database per tenant with dynamic configuration of tenants, secured by Spring Security

Primary LanguageJavaApache License 2.0Apache-2.0

Adding tenants without application restart in SaaS style multi-tenant web app with Spring Boot 2 and Spring Security 5

SaaS application style multi-tenancy with database per tenant using Spring Boot 2 + JPA + Hibernate + Spring Security 5. This app is built with MySQL as the database. It can be adapted to use any other database like Microsoft SQL Server.

Note: This app reads the tenant information from a separate database table and does not require an application restart when new tenants are added.

This repository contains code which accompanies the blog post Adding tenants without application restart in SaaS style multi-tenant web app with Spring Boot 2 and Spring Security 5

Getting Started

This is a typical maven project. Download the source as a zip file or checkout the code and import as an Existing Maven project in your IDE.

Prerequisites

  • Java 8
  • Spring Boot 2
  • MySQL
  • Not mandatory, but you can use any suitable IDE like Spring STS

Authors

License

This project is licensed under the Apache License - see the LICENSE.md file for details

Request

You are free to fork this repository, but please drop me a note at sunitkatkar@gmail.com