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:- The skeleton of a tenant resolver
- Domain class to represent tenants
- Simple tenant repository implementation
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 theMultiTenant
annotation (these classes use the User domain to store the multi-tenant id.This script will generate:
- A tenant resolver that integrates with Spring Securty
- Domain class to represent tenants
- A tenant repository implementation that integrates with Spring Security
grails-app/conf/Config.groovy
and grails-app/conf/spring/resources.groovy
after running this script.Example: grails mt-spring-security com.yourapp Customer