(Quick Reference)

4 Scripts - Reference Documentation

Authors: Kim A. Betti

Version: 0.8.3

4 Scripts

Important! Some of the scripts will make changes to existing files! Make sure to commit any changes before running a script! This way you can roll back if something goes wrong.

4.1 mt-quickstart

This script will generate:
  1. The skeleton of a tenant resolver
  2. Domain class to represent tenants
  3. Simple tenant repository implementation

You will have to update grails-app/conf/Config.groovy and grails-app/conf/spring/resources.groovy after running this script.

Example: grails mt-quickstart com.yourapp DomainTenantResolver CachingTenantRepository Customer

4.2 mt-spring-security

This script is intended to help users integrate multi-tenant-single-db with spring-security-core.

More specifically, this will generate the required multi-tenant-single-db classes for you to support multiple Spring Security users within a single tenant.

This will not help you if you intend to mark the Spring Security class with the MultiTenant annotation (these classes use the User domain to store the multi-tenant id.

This script will generate:

  1. A tenant resolver that integrates with Spring Securty
  2. Domain class to represent tenants
  3. A tenant repository implementation that integrates with Spring Security

You will have to update grails-app/conf/Config.groovy and grails-app/conf/spring/resources.groovy after running this script.

Example: grails mt-spring-security com.yourapp Customer