Class CosIdProperties
java.lang.Object
me.ahoo.cosid.spring.boot.starter.CosIdProperties
Configuration properties for CosId framework.
This class defines the main configuration properties that control the behavior of the CosId ID generation framework. Properties can be configured via application.properties or application.yml using the prefix "cosid".
Example configuration:
cosid:
enabled: true
namespace: myapp
proxy:
enabled: false
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault namespace used when no specific namespace is configured. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the configured namespace for ID generation.getProxy()Gets the proxy configuration properties.booleanChecks if CosId is enabled.voidsetEnabled(boolean enabled) Sets whether CosId auto-configuration should be enabled.voidsetNamespace(String namespace) Sets the namespace for ID generation.setProxy(ProxyProperties proxy) Sets the proxy configuration properties.
-
Field Details
-
DEFAULT_NAMESPACE
Default namespace used when no specific namespace is configured.- See Also:
-
-
Constructor Details
-
CosIdProperties
public CosIdProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Checks if CosId is enabled.- Returns:
- true if CosId auto-configuration is enabled, false otherwise
-
setEnabled
public void setEnabled(boolean enabled) Sets whether CosId auto-configuration should be enabled.- Parameters:
enabled- true to enable CosId, false to disable
-
getNamespace
Gets the configured namespace for ID generation.- Returns:
- the namespace string
-
setNamespace
Sets the namespace for ID generation.- Parameters:
namespace- the namespace string to use
-
getProxy
Gets the proxy configuration properties.- Returns:
- the proxy properties
-
setProxy
Sets the proxy configuration properties.- Parameters:
proxy- the proxy properties to set- Returns:
- this properties instance for method chaining
-