The global configuration feature of Dubbo allows you to set global configurations that apply to all instances of an application or all applications, implementing central management of configurations.
Set a Dubbo global configuration
- At the top of the page, click the tab.
- In the Query Result section of the tab, click Create on the right.
- In the Create Dubbo Configuration dialog box, set a rule. For more information, see Global configuration rules. After the configuration is complete, click Create.
Global configuration rules
The global configuration feature allows you to centrally manage configurations. Global configuration is the same as local configuration in terms of content and format. Global configuration can be regarded as external storage of `dubbo.properties`. Then, the configuration center is used to extract the public configurations for central management.
dubbo.protocol.name=dubbo dubbo.protocol.port=20880 dubbo.application.qos.port=22222
Global configuration priorities
By default, global configuration takes precedence over local configuration. Therefore,
the following configuration overwrites local configuration. The configuration priorities
are as follows: 1. JVM System Properties, -D parameter; 2. Externalized Configuration,
global configuration (which is described in this topic); 3. Configurations collected
by ServiceConfig and ReferenceConfig; 4. Local configuration file
You can set the following parameter to adjust priority of configurations in the configuration center:
Scope of global configuration
The global configuration feature supports configuration at the global level and application level. Configurations at the global level are shared by all Dubbo applications, whereas configurations at the application level are maintained by every application and are visible only to this application.