Class BaseNacosProperties

java.lang.Object
io.agentscope.spring.boot.nacos.properties.BaseNacosProperties
Direct Known Subclasses:
AgentScopeA2aNacosProperties, AgentScopeNacosPromptProperties, AgentScopeNacosProperties

public class BaseNacosProperties extends Object
Properties for Nacos Client connecting to Nacos Server.

This class is used to configure the Nacos Server basic properties, like serverAddr, namespace, username, password and more.

The properties is used to configure the Nacos Server advanced properties. Keys of properties are from PropertyKeyConst

  • Constructor Details

    • BaseNacosProperties

      public BaseNacosProperties()
  • Method Details

    • getNamespace

      public String getNamespace()
    • setNamespace

      public void setNamespace(String namespace)
    • getServerAddr

      public String getServerAddr()
    • setServerAddr

      public void setServerAddr(String serverAddr)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getAccessKey

      public String getAccessKey()
    • setAccessKey

      public void setAccessKey(String accessKey)
    • getSecretKey

      public String getSecretKey()
    • setSecretKey

      public void setSecretKey(String secretKey)
    • getProperties

      public Properties getProperties()
    • setProperties

      public void setProperties(Properties properties)
    • getExplicitNacosProperties

      public Properties getExplicitNacosProperties()
      Build a Properties instance containing only the explicitly configured fields.

      Unlike getNacosProperties(), this method does NOT apply default values for serverAddr and namespace. This is useful for overlay/merge scenarios where default values should not overwrite a parent configuration.

      Returns:
      a Properties instance containing only explicitly set Nacos configuration
    • getNacosProperties

      public Properties getNacosProperties()
      Build a Properties instance for configuring the Nacos client.

      This method builds on getExplicitNacosProperties() and additionally applies default values (DEFAULT_ADDRESS and DEFAULT_NAMESPACE) when the corresponding fields are not explicitly configured.

      Returns:
      a Properties instance containing all resolved Nacos configuration