dubbo:config-center element

Configuration center. Corresponding configuration class: org.apache.dubbo.config.ConfigCenterConfig

property Corresponding URL parameter type required default value description compatibility
protocol config.protocol string optional zookeeper Which configuration center to use: apollo, zookeeper, nacos, etc.
take zookeeper for example
1. If protocol is specified, address can be simplified to;
2. If protocol is not specified, address is set to zookeeper://
address config.address string required Configuration center address.
See protocol description for values
highest-priority config.highestPriority boolean optional true Configuration items from the configuration center have the highest priority, it means that the local configuration items will be overwritten. 2.7.0+
namespace config.namespace string optional dubbo Using for multi-tenant isolation generally, the actual meaning varies depending on the configuration center.
For example:
zookeeper - Environment isolation, default dubbo
apollo - Distinguish between sets of configurations for different domains and use them by default dubbo and application
cluster config.cluster string optional The meaning varies according to the configuration center selected.
For example, it’s used to distinguish between different configuration clusters in apollo
group config.group string optional dubbo The meaning varies according to the configuration center selected.
nacos - Isolate different configuration sets
zookeeper - Isolate different configuration sets
check config.check boolean optional true Whether to terminate application startup when the configuration hub connection fails. 2.7.0+
config-file config.configFile string optional dubbo.properties The key mapped to the global level profile
zookeeper - $DEFAULT_PATH/dubbo/config/dubbo/dubbo.properties
apollo - The dubbo.properties key in dubbo namespace
timeout config.timeout integer 3000ms Gets the configured timeout 2.7.0+
username string the username if the configuration center requires validation
Apollo is not yet enabled
password string password if configuration center needs to do check
Apollo is not yet enabled
parameters Map<string, string> Extended parameters to support customized configuration parameters for different configuration centers 2.7.0+
include-spring-env boolean optional false With the Spring framework support, when the value is true, it will automatically reads the configuration from the Spring Environment
Read by default
Configuration with key dubbo.properties
PropertySource with key dubbo.properties