Class InternetDomainNameSubdomainTenantResolver
java.lang.Object
io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
io.micronaut.multitenancy.tenantresolver.InternetDomainNameSubdomainTenantResolver
- All Implemented Interfaces:
HttpRequestTenantResolver
,TenantResolver
@Singleton
@Requires(bean=io.micronaut.http.server.util.HttpHostResolver.class) @Requires(classes=com.google.common.net.InternetDomainName.class) @Requires(property="micronaut.multitenancy.tenantresolver.subdomain.guava.enabled",value="true",defaultValue="true") @Requires(property="micronaut.multitenancy.tenantresolver.subdomain.enabled",value="true",defaultValue="false")
public class InternetDomainNameSubdomainTenantResolver
extends AbstractSubdomainTenantResolver
A tenant resolver that resolves the tenant from the subdomain. To resolve the subdomain it uses Guava
InternetDomainName
.- Since:
- 5.1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from class io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
httpHostResolver
Fields inherited from interface io.micronaut.multitenancy.tenantresolver.TenantResolver
ALL, DEFAULT, PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionInternetDomainNameSubdomainTenantResolver
(io.micronaut.http.server.util.HttpHostResolver httpHostResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull Serializable
resolveSubdomain
(@NonNull String host) Methods inherited from class io.micronaut.multitenancy.tenantresolver.AbstractSubdomainTenantResolver
resolveTenantIdentifier, resolveTenantIdentifier
-
Constructor Details
-
InternetDomainNameSubdomainTenantResolver
public InternetDomainNameSubdomainTenantResolver(io.micronaut.http.server.util.HttpHostResolver httpHostResolver) - Parameters:
httpHostResolver
- HTTP host resolver.
-
-
Method Details
-
resolveSubdomain
- Specified by:
resolveSubdomain
in classAbstractSubdomainTenantResolver
- Parameters:
host
- Host- Returns:
- The subdomain.
-