Class BaseNacosProperties
java.lang.Object
io.agentscope.spring.boot.nacos.properties.BaseNacosProperties
- Direct Known Subclasses:
AgentScopeA2aNacosProperties,AgentScopeNacosPromptProperties,AgentScopeNacosProperties
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuild aPropertiesinstance containing only the explicitly configured fields.Build aPropertiesinstance for configuring the Nacos client.voidsetAccessKey(String accessKey) voidsetNamespace(String namespace) voidsetPassword(String password) voidsetProperties(Properties properties) voidsetSecretKey(String secretKey) voidsetServerAddr(String serverAddr) voidsetUsername(String username)
-
Constructor Details
-
BaseNacosProperties
public BaseNacosProperties()
-
-
Method Details
-
getNamespace
-
setNamespace
-
getServerAddr
-
setServerAddr
-
getUsername
-
setUsername
-
getPassword
-
setPassword
-
getAccessKey
-
setAccessKey
-
getSecretKey
-
setSecretKey
-
getProperties
-
setProperties
-
getExplicitNacosProperties
Build aPropertiesinstance containing only the explicitly configured fields.Unlike
getNacosProperties(), this method does NOT apply default values forserverAddrandnamespace. This is useful for overlay/merge scenarios where default values should not overwrite a parent configuration.- Returns:
- a
Propertiesinstance containing only explicitly set Nacos configuration
-
getNacosProperties
Build aPropertiesinstance for configuring the Nacos client.This method builds on
getExplicitNacosProperties()and additionally applies default values (DEFAULT_ADDRESSandDEFAULT_NAMESPACE) when the corresponding fields are not explicitly configured.- Returns:
- a
Propertiesinstance containing all resolved Nacos configuration
-