Class CosIdProperties

java.lang.Object
me.ahoo.cosid.spring.boot.starter.CosIdProperties

@ConfigurationProperties(prefix="cosid") public class CosIdProperties extends Object
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 Details

    • DEFAULT_NAMESPACE

      public static final String 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

      public String getNamespace()
      Gets the configured namespace for ID generation.
      Returns:
      the namespace string
    • setNamespace

      public void setNamespace(String namespace)
      Sets the namespace for ID generation.
      Parameters:
      namespace - the namespace string to use
    • getProxy

      public ProxyProperties getProxy()
      Gets the proxy configuration properties.
      Returns:
      the proxy properties
    • setProxy

      public CosIdProperties setProxy(ProxyProperties proxy)
      Sets the proxy configuration properties.
      Parameters:
      proxy - the proxy properties to set
      Returns:
      this properties instance for method chaining