Class HttpHeaderTenantResolverConfigurationProperties
java.lang.Object
io.micronaut.multitenancy.tenantresolver.HttpHeaderTenantResolverConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,HttpHeaderTenantResolverConfiguration
@ConfigurationProperties("micronaut.multitenancy.tenantresolver.httpheader")
public class HttpHeaderTenantResolverConfigurationProperties
extends Object
implements HttpHeaderTenantResolverConfiguration
ConfigurationProperties
implementation of HttpHeaderTenantResolverConfiguration
.- 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.HttpHeaderTenantResolverConfiguration
DEFAULT_HEADER_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHttp Header name which should be used to resolve the tenant id from.boolean
void
setEnabled
(boolean enabled) EnablesHttpHeaderTenantResolver
.void
setHeaderName
(String headerName) Http Header name which should be used to resolve the tenant id from.
-
Field Details
-
PREFIX
Configuration Properties Prefix.- See Also:
-
DEFAULT_ENABLE
public static final boolean DEFAULT_ENABLEThe default enable value.- See Also:
-
-
Constructor Details
-
HttpHeaderTenantResolverConfigurationProperties
public HttpHeaderTenantResolverConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) EnablesHttpHeaderTenantResolver
. Default value (false).- Parameters:
enabled
- True or False
-
setHeaderName
Http Header name which should be used to resolve the tenant id from. Default value ("tenantId").- Parameters:
headerName
- Http Header name.
-
getHeaderName
Description copied from interface:HttpHeaderTenantResolverConfiguration
Http Header name which should be used to resolve the tenant id from.- Specified by:
getHeaderName
in interfaceHttpHeaderTenantResolverConfiguration
- Returns:
- a String containing the Http Header name.
-