@Singleton @Requires(beans=SystemPropertyTenantResolverConfiguration.class) @Requires(property="micronaut.multitenancy.tenantresolver.systemproperty.enabled",value="true",defaultValue="false") public class SystemPropertyTenantResolver extends Object implements TenantResolver
TenantResolver that resolves from a System property called . Useful for testing.ALL, DEFAULT, PREFIX| Constructor and Description | 
|---|
| SystemPropertyTenantResolver(SystemPropertyTenantResolverConfiguration systemPropertyTenantResolverConfiguration)Constructs a system property tenant resolver. | 
| Modifier and Type | Method and Description | 
|---|---|
| Serializable | resolveTenantIdentifier()Resolves the current tenant identifier. | 
public SystemPropertyTenantResolver(SystemPropertyTenantResolverConfiguration systemPropertyTenantResolverConfiguration)
systemPropertyTenantResolverConfiguration - SystemPropertyTenantResolverConfiguration Configuration for system property tenant resolver.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.