Class CookieTenantResolverConfigurationProperties
java.lang.Object
io.micronaut.multitenancy.tenantresolver.CookieTenantResolverConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,CookieTenantResolverConfiguration
@ConfigurationProperties("micronaut.multitenancy.tenantresolver.cookie")
public class CookieTenantResolverConfigurationProperties
extends Object
implements CookieTenantResolverConfiguration
ConfigurationProperties
implementation of CookieTenantResolverConfiguration
.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
Configuration Properties Prefix.Fields inherited from interface io.micronaut.multitenancy.tenantresolver.CookieTenantResolverConfiguration
DEFAULT_COOKIENAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCookie name which should be used to resolve the tenant id from.boolean
void
setCookiename
(String cookiename) Cookie name which should be used to resolve the tenant id from.void
setEnabled
(boolean enabled) Whether to enableCookieTenantResolver
.
-
Field Details
-
PREFIX
Configuration Properties Prefix.- See Also:
-
DEFAULT_ENABLE
public static final boolean DEFAULT_ENABLEThe default enable value.- See Also:
-
-
Constructor Details
-
CookieTenantResolverConfigurationProperties
public CookieTenantResolverConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Whether to enableCookieTenantResolver
. Default value (false).- Parameters:
enabled
- True or False
-
setCookiename
Cookie name which should be used to resolve the tenant id from. Default value ("tenantId").- Parameters:
cookiename
- Http Header name.
-
getCookiename
Description copied from interface:CookieTenantResolverConfiguration
Cookie name which should be used to resolve the tenant id from.- Specified by:
getCookiename
in interfaceCookieTenantResolverConfiguration
- Returns:
- a String with the Cookie name.
-