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
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final StringConfiguration Properties Prefix.Fields inherited from interface io.micronaut.multitenancy.tenantresolver.CookieTenantResolverConfiguration
DEFAULT_COOKIENAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCookie name which should be used to resolve the tenant id from.booleanvoidsetCookiename(String cookiename) Cookie name which should be used to resolve the tenant id from.voidsetEnabled(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:
isEnabledin 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:CookieTenantResolverConfigurationCookie name which should be used to resolve the tenant id from.- Specified by:
getCookienamein interfaceCookieTenantResolverConfiguration- Returns:
- a String with the Cookie name.
-