@Requires(beans=FixedTenantResolverConfiguration.class) @Requires(property="micronaut.multitenancy.tenantresolver.fixed.enabled",value="true",defaultValue="false") @Singleton public class FixedTenantResolver extends Object implements TenantResolver
TenantResolver that resolves to a fixed static named tenant id.ALL, DEFAULT, PREFIX| Constructor and Description |
|---|
FixedTenantResolver(FixedTenantResolverConfiguration fixedTenantResolverConfiguration)
Constructs a fixed tenant resolver.
|
| Modifier and Type | Method and Description |
|---|---|
Serializable |
resolveTenantIdentifier()
Resolves the current tenant identifier.
|
public FixedTenantResolver(FixedTenantResolverConfiguration fixedTenantResolverConfiguration)
fixedTenantResolverConfiguration - Fixed tenant resolver configuration FixedTenantResolverConfiguration.public Serializable resolveTenantIdentifier() throws TenantNotFoundException
TenantResolverResolves the current tenant identifier.
In a Multi Tenant setup where a single database is being used amongst multiple tenants this would be the object that is used as the tenantId property for each domain class.
resolveTenantIdentifier in interface TenantResolverTenantNotFoundException - if tenant not found