Class ConfiguredTenantSupplier

java.lang.Object
org.chenile.core.tenant.ConfiguredTenantSupplier
All Implemented Interfaces:
TenantSupplier

public class ConfiguredTenantSupplier extends Object implements TenantSupplier
The default TenantSupplier. The tenants are, in order:
  1. chenile.tenants, a comma-separated list, when it is set;
  2. the keys of the "multiTenantTargetDataSources" map, when multi-datasource-utils is in use (looked up by bean name on every call, so a refreshed map is picked up and the class is not needed on the class path);
  3. otherwise none: a single-tenant deployment.
  • Field Details

    • MULTI_TENANT_DATA_SOURCES

      public static final String MULTI_TENANT_DATA_SOURCES
      Bean name of the tenant to DataSource map published by multi-datasource-utils.
      See Also:
    • configured

      private final List<String> configured
    • beans

      private final BeanFactory beans
  • Constructor Details

    • ConfiguredTenantSupplier

      public ConfiguredTenantSupplier(String configuredTenants, BeanFactory beans)
  • Method Details