This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Zookeeper 4.1.3!spring-doc.cn

Common application properties

Various properties can be specified inside your application.properties file, inside your application.yml file, or as command line switches. This appendix provides a list of common Spring Cloud Zookeeper properties and references to the underlying classes that consume them.spring-doc.cn

Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. Also, you can define your own properties.
Name Default Description

spring.cloud.zookeeper.base-sleep-time-msspring-doc.cn

50spring-doc.cn

Initial amount of time to wait between retries.spring-doc.cn

spring.cloud.zookeeper.block-until-connected-unitspring-doc.cn

The unit of time related to blocking on connection to Zookeeper.spring-doc.cn

spring.cloud.zookeeper.block-until-connected-waitspring-doc.cn

10spring-doc.cn

Wait time to block on connection to Zookeeper.spring-doc.cn

spring.cloud.zookeeper.config.default-contextspring-doc.cn

applicationspring-doc.cn

The name of the default context.spring-doc.cn

spring.cloud.zookeeper.config.enabledspring-doc.cn

truespring-doc.cn

spring.cloud.zookeeper.config.fail-fastspring-doc.cn

truespring-doc.cn

Throw exceptions during config lookup if true, otherwise, log warnings.spring-doc.cn

spring.cloud.zookeeper.config.namespring-doc.cn

Alternative to spring.application.name to use in looking up values in zookeeper.spring-doc.cn

spring.cloud.zookeeper.config.profile-separatorspring-doc.cn

,spring-doc.cn

Separator for profile appended to the application name.spring-doc.cn

spring.cloud.zookeeper.config.rootspring-doc.cn

configspring-doc.cn

Root folder where the configuration for Zookeeper is kept.spring-doc.cn

spring.cloud.zookeeper.connect-stringspring-doc.cn

localhost:2181spring-doc.cn

Connection string to the Zookeeper cluster.spring-doc.cn

spring.cloud.zookeeper.connection-timeoutspring-doc.cn

The configured connection timeout in milliseconds.spring-doc.cn

spring.cloud.zookeeper.dependenciesspring-doc.cn

Mapping of alias to ZookeeperDependency. From LoadBalancer perspective the alias is actually serviceID since SC LoadBalancer can’t accept nested structures in serviceID.spring-doc.cn

spring.cloud.zookeeper.dependency-configurationsspring-doc.cn

spring.cloud.zookeeper.dependency-namesspring-doc.cn

spring.cloud.zookeeper.discovery.enabledspring-doc.cn

truespring-doc.cn

spring.cloud.zookeeper.discovery.initial-statusspring-doc.cn

The initial status of this instance (defaults to {@link StatusConstants#STATUS_UP}).spring-doc.cn

spring.cloud.zookeeper.discovery.instance-hostspring-doc.cn

Predefined host with which a service can register itself in Zookeeper. Corresponds to the {code address} from the URI spec.spring-doc.cn

spring.cloud.zookeeper.discovery.instance-idspring-doc.cn

Id used to register with zookeeper. Defaults to a random UUID.spring-doc.cn

spring.cloud.zookeeper.discovery.instance-portspring-doc.cn

Port to register the service under (defaults to listening port).spring-doc.cn

spring.cloud.zookeeper.discovery.instance-ssl-portspring-doc.cn

Ssl port of the registered service.spring-doc.cn

spring.cloud.zookeeper.discovery.metadataspring-doc.cn

Gets the metadata name/value pairs associated with this instance. This information is sent to zookeeper and can be used by other instances.spring-doc.cn

spring.cloud.zookeeper.discovery.orderspring-doc.cn

0spring-doc.cn

Order of the discovery client used by CompositeDiscoveryClient for sorting available clients.spring-doc.cn

spring.cloud.zookeeper.discovery.registerspring-doc.cn

truespring-doc.cn

Register as a service in zookeeper.spring-doc.cn

spring.cloud.zookeeper.discovery.rootspring-doc.cn

/servicesspring-doc.cn

Root Zookeeper folder in which all instances are registered.spring-doc.cn

spring.cloud.zookeeper.discovery.uri-specspring-doc.cn

{scheme}://{address}:{port}spring-doc.cn

The URI specification to resolve during service registration in Zookeeper.spring-doc.cn

spring.cloud.zookeeper.enabledspring-doc.cn

truespring-doc.cn

Is Zookeeper enabled.spring-doc.cn

spring.cloud.zookeeper.max-retriesspring-doc.cn

10spring-doc.cn

Max number of times to retry.spring-doc.cn

spring.cloud.zookeeper.max-sleep-msspring-doc.cn

500spring-doc.cn

Max time in ms to sleep on each retry.spring-doc.cn

spring.cloud.zookeeper.prefixspring-doc.cn

Common prefix that will be applied to all Zookeeper dependencies' paths.spring-doc.cn

spring.cloud.zookeeper.session-timeoutspring-doc.cn

The configured/negotiated session timeout in milliseconds. Please refer to <a href='https://cwiki.apache.org/confluence/display/CURATOR/TN14'>Curator’s Tech Note 14</a> to understand how Curator implements connection sessions. @see <a href='https://cwiki.apache.org/confluence/display/CURATOR/TN14'>Curator’s Tech Note 14</a>spring-doc.cn