Class SubdomainTenantResolver

java.lang.Object
io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
io.micronaut.multitenancy.tenantresolver.SubdomainTenantResolver
All Implemented Interfaces:
HttpRequestTenantResolver, TenantResolver

@Singleton @Secondary @Requires(bean=io.micronaut.http.server.util.HttpHostResolver.class) @Requires(property="micronaut.multitenancy.tenantresolver.subdomain.enabled",value="true",defaultValue="false") public class SubdomainTenantResolver extends AbstractSubdomainTenantResolver
Tenant resolver that resolves the tenant from the Subdomain. It requires a bean of type HttpHostResolver. It does not support every domain suffix. For example, it does not support second-level domains.
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • SubdomainTenantResolver

      @Inject public SubdomainTenantResolver(io.micronaut.http.server.util.HttpHostResolver httpHostResolver)
      Parameters:
      httpHostResolver - HTTP host resolver.
      Since:
      5.0.3
    • SubdomainTenantResolver

      @Deprecated(since="5.0.3", forRemoval=true) public SubdomainTenantResolver()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details