Properties Configuration

If your application is simple enough, say, you do not need multi-registries or multi-protocols, and you want to share configuration among Spring containers. You can use as default configuration.

Dubbo will load under the root of classpath automatically, you can also specify the path for loading this file by using JVM parameter:

Mapping Rules

Combine the tag name and attribute name of the XML tag, use . to split. One property per line.

  • equals to <dubbo:application name="foo" />
  • dubbo.registry.address= equals to <dubbo:registry address="" />

If you have more than one tags in a XML configuration, you can use the id value to distinguish. If you don't specify a id, ti will applied to all tags.

  • dubbo.protocol.rmi.port=1234 equals to <dubbo:protocol id="rmi" name="rmi" port="1099" />
  • dubbo.registry.china.address= equals to <dubbo:registry id="china" address="" />

Here is a typical demo configuration:

Overrides and Priorities


Priorities from high to low:

  • JVM -D parameters, you can easily override configuration when deploying or starting applications, e.g., change the port of dubbo protocol。

  • XML, the properties present in XML will override that in

  • Properties, the default value, only works when it is not configured with XML or JVM.

1: If more than one under classpath, say, two jars contains separately, Dubbo will arbitarily choose one to to load, and log Error info.
2: If id not configured on protocol, will use name property as default

results matching ""

    No results matching ""