blob: bf3f3cae8fd405226e83b42337317612f315eaf8 [file] [log] [blame]
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apache Dubbo – Configuration Manual</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/</link><description>Recent content in Configuration Manual on Apache Dubbo</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs3-V2: Configuration Overview</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/overview/</guid><description>
&lt;p>Quickly jump to the content you care about through the following links:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="../../../quick-start/spring-boot/">Use Spring Boot to quickly develop Dubbo applications&lt;/a>&lt;/li>
&lt;li>&lt;a href="../properties">Configuration item reference manual to know what configuration items are available&lt;/a>&lt;/li>
&lt;li>&lt;a href="../principle">How configuration loading and overriding works&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="configuration-components">Configuration components&lt;/h2>
&lt;p>In order to better manage various configurations, Dubbo abstracts a set of structured configuration components. Each component is generally divided by purpose and controls the behavior of different scopes.&lt;/p>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/user/dubbo-config.jpg" alt="dubbo-config">&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Component Name&lt;/th>
&lt;th>Description&lt;/th>
&lt;th>Scope&lt;/th>
&lt;th>Required&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>application&lt;/td>
&lt;td>Specify the application-level information such as the application name&lt;/td>
&lt;td>Only one application is allowed in an application&lt;/td>
&lt;td>Required&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>service&lt;/td>
&lt;td>Declare a common interface or implementation class as a Dubbo service&lt;/td>
&lt;td>There can be 0 or more services in an application&lt;/td>
&lt;td>At least one service/reference&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>reference&lt;/td>
&lt;td>Declare a common interface as a Dubbo service&lt;/td>
&lt;td>There can be 0 or more references in an application&lt;/td>
&lt;td>At least one service/reference&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>The RPC protocol to be exposed and related configurations such as port numbers, etc.&lt;/td>
&lt;td>One application can be configured with multiple, one protocol can be used for a set of service&amp;amp;reference&lt;/td>
&lt;td>optional, default dubbo&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registry&lt;/td>
&lt;td>Registry type, address and related configuration&lt;/td>
&lt;td>Multiple configurations can be made in one application, and one registry can be applied to a group of service&amp;amp;references&lt;/td>
&lt;td>Mandatory&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>config-center&lt;/td>
&lt;td>configuration center type, address and related configurations&lt;/td>
&lt;td>multiple configurations in one application, shared by all services&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>metadata-report&lt;/td>
&lt;td>metadata center type, address and related configuration&lt;/td>
&lt;td>multiple configurations in one application, shared by all services&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Consumer&lt;/td>
&lt;td>The default configuration shared between references&lt;/td>
&lt;td>Multiple configurations can be configured in one application, and one consumer can act on a group of references&lt;/td>
&lt;td>Optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Provider&lt;/td>
&lt;td>The default configuration shared between services&lt;/td>
&lt;td>Multiple configurations can be configured in one application, and one provider can be used for a group of services&lt;/td>
&lt;td>Optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>monitor&lt;/td>
&lt;td>monitoring system type and address&lt;/td>
&lt;td>only one can be configured in an application&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>metrics&lt;/td>
&lt;td>related configuration of the data acquisition module&lt;/td>
&lt;td>only one configuration is allowed in an application&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ssl&lt;/td>
&lt;td>ssl/tls security link-related certificate configuration&lt;/td>
&lt;td>Only one configuration is allowed in an application&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>method&lt;/td>
&lt;td>specifies method-level configuration&lt;/td>
&lt;td>subconfigurations for service and reference&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>argument&lt;/td>
&lt;td>parameter configuration of a method&lt;/td>
&lt;td>subconfiguration of method&lt;/td>
&lt;td>optional&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;ol>
&lt;li>From the perspective of implementation principle, all configuration items of Dubbo will be assembled into the URL in the end, and the URL will be used as the carrier to pass during subsequent startup and RPC calls, thereby controlling the behavior of the framework. For more information, please refer to the Dubbo source code analysis series of documents or [Blog](/zh-cn/blog/2019/10/17/dubbo-in-url-unified model/#rpc call).&lt;/li>
&lt;li>For the specific configuration items supported by each component and their meanings, please refer to &lt;a href="../properties">Configuration Item Manual&lt;/a>&lt;/li>
&lt;/ol>
&lt;/blockquote>
&lt;h3 id="service-and-reference">service and reference&lt;/h3>
&lt;p>&lt;code>service&lt;/code> and &lt;code>reference&lt;/code> are the two most basic configuration items of Dubbo, they are used to register a specified interface or implementation class as a Dubbo service, and control the behavior of the service through configuration items.&lt;/p>
&lt;ul>
&lt;li>&lt;code>service&lt;/code> is used on the service provider side, the interface and implementation class configured by &lt;code>service&lt;/code> will be defined as a standard Dubbo service, so as to provide external RPC request services.&lt;/li>
&lt;li>&lt;code>reference&lt;/code> is used for service consumers, the interface configured by &lt;code>reference&lt;/code> will be defined as a standard Dubbo service, and the generated proxy can initiate an RPC request to the remote end.&lt;/li>
&lt;/ul>
&lt;p>Any number of &lt;code>service&lt;/code> and &lt;code>reference&lt;/code> can be configured in an application.&lt;/p>
&lt;h3 id="consumer-and-provider">consumer and provider&lt;/h3>
&lt;ul>
&lt;li>When there are multiple &lt;code>reference&lt;/code> configurations in the application, &lt;code>consumer&lt;/code> specifies the default values shared by these &lt;code>reference&lt;/code>s, such as shared timeouts, etc. to simplify cumbersome configurations, such as setting configurations separately in a &lt;code>reference&lt;/code> Item value, the configuration in this &lt;code>reference&lt;/code> takes precedence.&lt;/li>
&lt;li>When there are multiple &lt;code>service&lt;/code> configurations in the application, &lt;code>provider&lt;/code> specifies the default value shared by these &lt;code>service&lt;/code>, if a configuration item value is set separately in a &lt;code>service&lt;/code>, the configuration priority in the &lt;code>service&lt;/code> higher.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>The consumer component can also carry out virtual grouping of references, and references under different groups can have different consumer default value settings; for example, in XML format configuration, the &amp;lt;dubbo:reference /&amp;gt; tag can be nested in &amp;lt;dubbo:consumer / &amp;gt; Implement grouping within tags. The same effect can also be achieved between provider and service.&lt;/p>
&lt;/blockquote>
&lt;h2 id="configuration-method">configuration method&lt;/h2>
&lt;p>According to the driving mode, it can be divided into the following five modes:&lt;/p>
&lt;h3 id="api-configuration">API configuration&lt;/h3>
&lt;p>The configuration is organized in the form of Java coding, including Raw API and Bootstrap API. For details, please refer to &lt;a href="../api">API configuration&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#268bd2">throws&lt;/span> IOException &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>GreetingsService&lt;span style="color:#719e07">&amp;gt;&lt;/span> service &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setApplication&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> ApplicationConfig&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;first-dubbo-provider&amp;#34;&lt;/span>&lt;span style="color:#719e07">));&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRegistry&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;multicast://224.5.6.7:1234&amp;#34;&lt;/span>&lt;span style="color:#719e07">));&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>GreetingsService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRef&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> GreetingsServiceImpl&lt;span style="color:#719e07">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">export&lt;/span>&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#719e07">.&lt;/span>out&lt;span style="color:#719e07">.&lt;/span>println&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;first-dubbo-provider is running.&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#719e07">.&lt;/span>in&lt;span style="color:#719e07">.&lt;/span>read&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="xml-configuration">XML configuration&lt;/h3>
&lt;p>Configure various components in XML and support seamless integration with Spring. For details, please refer to &lt;a href="../xml">XML Configuration&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- dubbo-provier.xml --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:application&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;demo-provider&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:config-center&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:registry&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span> simplified=&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:metadata-report&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;redis://127.0.0.1:6379&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:protocol&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;dubbo&amp;#34;&lt;/span> port=&lt;span style="color:#2aa198">&amp;#34;20880&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;bean&lt;/span> id=&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span> class=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.basic.impl.DemoServiceImpl&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:service&lt;/span> interface=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.basic.api.DemoService&amp;#34;&lt;/span> ref=&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="annotation-configuration">Annotation configuration&lt;/h3>
&lt;p>Expose services and reference service interfaces in the form of annotations, and support seamless integration with Spring. For details, please refer to &lt;a href="../annotation">Annotation Configuration&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// AnnotationService service implementation
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@DubboService&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">AnnotationServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> AnnotationService &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@Override&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> String &lt;span style="color:#268bd2">sayHello&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String name&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#719e07">.&lt;/span>out&lt;span style="color:#719e07">.&lt;/span>println&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;async provider received: &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> name&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#2aa198">&amp;#34;annotation: hello, &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> name&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## dubbo.properties&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.application.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">annotation-provider&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registry.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2181&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">20880&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="spring-boot">Spring Boot&lt;/h3>
&lt;p>Use Spring Boot to reduce unnecessary configuration, and combine Annotation and application.properties/application.yml to develop Dubbo applications. For details, please refer to &lt;a href="../annotation">Annotation Configuration&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## application.properties&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Spring boot application&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>spring.application.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo-externalized-configuration-provider-sample&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.scan.base-packages&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">com.alibaba.boot.dubbo.demo.provider.service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Dubbo Application&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## The default value of dubbo.application.name is ${spring.application.name}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## dubbo.application.name=${spring.application.name}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">#Dubbo Protocol&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">12345&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## Dubbo Registry&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registry.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">N/A&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">## DemoService version&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>demo.service.version&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">1.0.0&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="property-configuration">Property configuration&lt;/h3>
&lt;p>Generate configuration components according to the attribute Key-value, similar to SpringBoot&amp;rsquo;s ConfigurationProperties, please refer to &lt;a href="../properties">property configuration&lt;/a> for details.&lt;/p>
&lt;p>Another important feature of property configuration is [property override](../principle/#32-property override), which overrides the created configuration component property with the value of an external property.&lt;/p>
&lt;p>If you want to put the attribute configuration in an external configuration center, please refer to [Externalized Configuration](../principle/#33-Externalized Configuration).&lt;/p>
&lt;p>In addition to the differences in peripheral drive methods, Dubbo&amp;rsquo;s configuration reading generally follows the following principles:&lt;/p>
&lt;ol>
&lt;li>Dubbo supports multi-level configuration, and automatically realizes the coverage between configurations according to the predetermined priority. Finally, all configurations are summarized into the data bus URL to drive subsequent service exposure, reference and other processes.&lt;/li>
&lt;li>The configuration format is mainly Properties, and the configuration content follows the agreed &lt;code>path-based&lt;/code>[naming convention](../principle/#1-configuration format)&lt;/li>
&lt;/ol>
&lt;h2 id="configure-the-loading-process">Configure the loading process&lt;/h2>
&lt;h3 id="configuration-specifications-and-sources">Configuration specifications and sources&lt;/h3>
&lt;p>Dubbo follows a &lt;a href="../principle/">path-based configuration specification&lt;/a>, and each configuration component can be expressed in this way. In terms of configuration sources, a total of 6 configuration sources are supported, that is, Dubbo will try to load configuration data from the following locations:&lt;/p>
&lt;ul>
&lt;li>JVM System Properties, JVM -D parameter&lt;/li>
&lt;li>System environment, the environment variable of the JVM process&lt;/li>
&lt;li>Externalized Configuration, [externalized configuration] (../principle/#33-externalized configuration), read from the configuration center&lt;/li>
&lt;li>Application Configuration, application attribute configuration, extract the attribute set starting with &amp;ldquo;dubbo&amp;rdquo; from the Spring application Environment&lt;/li>
&lt;li>The configuration collected by programming interfaces such as API/XML/annotation can be understood as a kind of configuration source, which is a configuration collection method directly oriented to user programming&lt;/li>
&lt;li>Read configuration file dubbo.properties from classpath&lt;/li>
&lt;/ul></description></item><item><title>Docs3-V2: API Configuration</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/api/</guid><description>
&lt;p>Assemble configuration, start Dubbo, publish and subscribe services through API coding. This method can support dynamic creation of ReferenceConfig/ServiceConfig, combined with generalized calls to meet the needs of API Gateway or test platform.&lt;/p>
&lt;blockquote>
&lt;p>Reference &lt;a href="https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-api">API Samples&lt;/a>&lt;/p>
&lt;/blockquote>
&lt;h2 id="service-provider">service provider&lt;/h2>
&lt;p>Expose the service interface through ServiceConfig, and publish the service interface to the registration center.&lt;/p>
&lt;blockquote>
&lt;p>Note: In order to better support Dubbo3 application-level service discovery, it is recommended to use the new &lt;a href="#bootstrap-api">DubboBootstrap API&lt;/a>.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ApplicationConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.RegistryConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ProviderConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ServiceConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoServiceImpl&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoProvider&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// service implementation
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> DemoService demoService &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> DemoServiceImpl&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// current application configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ApplicationConfig application &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ApplicationConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> application&lt;span style="color:#719e07">.&lt;/span>setName&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo-provider&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// connect registry configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> RegistryConfig registry &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> registry&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://10.20.130.230:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// service provider protocol configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ProtocolConfig protocol &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ProtocolConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setName&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setPort&lt;span style="color:#719e07">(&lt;/span>12345&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setThreads&lt;span style="color:#719e07">(&lt;/span>200&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Note: ServiceConfig is a heavy object, which internally encapsulates the connection with the registration center and opens the service port
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#586e75">// The service provider exposes the service configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> service &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;();&lt;/span> &lt;span style="color:#586e75">// This instance is very heavy and encapsulates the connection with the registration center, please cache it yourself, otherwise it may cause memory and connection leaks
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> service&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">setApplication&lt;/span>&lt;span style="color:#719e07">(&lt;/span>application&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRegistry&lt;span style="color:#719e07">(&lt;/span>registry&lt;span style="color:#719e07">);&lt;/span> &lt;span style="color:#586e75">// Multiple registries can use setRegistries()
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> service&lt;span style="color:#719e07">.&lt;/span>setProtocol&lt;span style="color:#719e07">(&lt;/span>protocol&lt;span style="color:#719e07">);&lt;/span> &lt;span style="color:#586e75">// multiple protocols can use setProtocols()
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> service&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRef&lt;span style="color:#719e07">(&lt;/span>demoService&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// expose and register services
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> service&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">export&lt;/span>&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Suspend waiting (to prevent the process from exiting)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> System&lt;span style="color:#719e07">.&lt;/span>in&lt;span style="color:#719e07">.&lt;/span>read&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="service-consumer">Service Consumer&lt;/h2>
&lt;p>Reference the remote service through ReferenceConfig, and subscribe to the service interface from the registry.&lt;/p>
&lt;blockquote>
&lt;p>Note: In order to better support Dubbo3 application-level service discovery, it is recommended to use the new &lt;a href="#bootstrap-api">DubboBootstrap API&lt;/a>.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ApplicationConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.RegistryConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ConsumerConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ReferenceConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoConsumer&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// current application configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ApplicationConfig application &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ApplicationConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> application&lt;span style="color:#719e07">.&lt;/span>setName&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo-consumer&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// connect registry configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> RegistryConfig registry &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> registry&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://10.20.130.230:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Note: ReferenceConfig is a heavy object, which internally encapsulates the connection with the registry and the connection with the service provider
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#586e75">// reference the remote service
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> reference &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;();&lt;/span> &lt;span style="color:#586e75">// This instance is very heavy and encapsulates the connection with the registry and the provider, please cache it yourself, otherwise it may cause memory and connection leaks
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> reference&lt;span style="color:#719e07">.&lt;/span>setApplication&lt;span style="color:#719e07">(&lt;/span>application&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> reference&lt;span style="color:#719e07">.&lt;/span>setRegistry&lt;span style="color:#719e07">(&lt;/span>registry&lt;span style="color:#719e07">);&lt;/span> &lt;span style="color:#586e75">// Multiple registries can use setRegistries()
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> reference&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> reference&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// use demoService like local bean
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#586e75">// Note: This proxy object internally encapsulates all communication details, the object is heavy, please cache and reuse
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> DemoService demoService &lt;span style="color:#719e07">=&lt;/span> reference&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">get&lt;/span>&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoService&lt;span style="color:#719e07">.&lt;/span>sayHello&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;Dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="bootstrap-api">Bootstrap API&lt;/h2>
&lt;p>DubboBootstrap API can reduce repeated configuration, better control the startup process, support batch publishing/subscribing service interfaces, and better support Dubbo3&amp;rsquo;s application-level service discovery.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.bootstrap.DubboBootstrap&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ApplicationConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.RegistryConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ProviderConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ServiceConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoServiceImpl&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoProvider&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ConfigCenterConfig configCenter &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ConfigCenterConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> configCenter&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// service provider protocol configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ProtocolConfig protocol &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ProtocolConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setName&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setPort&lt;span style="color:#719e07">(&lt;/span>12345&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> protocol&lt;span style="color:#719e07">.&lt;/span>setThreads&lt;span style="color:#719e07">(&lt;/span>200&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Note: ServiceConfig is a heavy object, which internally encapsulates the connection with the registration center and opens the service port
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#586e75">// The service provider exposes the service configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> demoServiceConfig &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoServiceConfig&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoServiceConfig&lt;span style="color:#719e07">.&lt;/span>setRef&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> DemoServiceImpl&lt;span style="color:#719e07">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoServiceConfig&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Second service configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>FooService&lt;span style="color:#719e07">&amp;gt;&lt;/span> fooServiceConfig &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">&amp;lt;&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooServiceConfig&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>FooService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooServiceConfig&lt;span style="color:#719e07">.&lt;/span>setRef&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> FooServiceImpl&lt;span style="color:#719e07">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooServiceConfig&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Use DubboBootstrap to simplify configuration assembly and control the startup process
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> DubboBootstrap&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">getInstance&lt;/span>&lt;span style="color:#719e07">()&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>application&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo-provider&amp;#34;&lt;/span>&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#586e75">// application configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>registry&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">))&lt;/span> &lt;span style="color:#586e75">// registry configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>protocol&lt;span style="color:#719e07">(&lt;/span>protocol&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#586e75">// global default protocol configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>service&lt;span style="color:#719e07">(&lt;/span>demoServiceConfig&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#586e75">// add ServiceConfig
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>service&lt;span style="color:#719e07">(&lt;/span>fooServiceConfig&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>start&lt;span style="color:#719e07">()&lt;/span> &lt;span style="color:#586e75">// start Dubbo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>await&lt;span style="color:#719e07">();&lt;/span> &lt;span style="color:#586e75">// suspend waiting (to prevent the process from exiting)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.bootstrap.DubboBootstrap&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ApplicationConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.RegistryConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ProviderConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.config.ServiceConfig&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> com.xxx.DemoServiceImpl&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoConsumer&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// reference the remote service
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> demoServiceReference &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoServiceReference&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoServiceReference&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>FooService&lt;span style="color:#719e07">&amp;gt;&lt;/span> fooServiceReference &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>FooService&lt;span style="color:#719e07">&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooServiceReference&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>FooService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooServiceReference&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// Use DubboBootstrap to simplify configuration assembly and control the startup process
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> DubboBootstrap bootstrap &lt;span style="color:#719e07">=&lt;/span> DubboBootstrap&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">getInstance&lt;/span>&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> bootstrap&lt;span style="color:#719e07">.&lt;/span>application&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo-consumer&amp;#34;&lt;/span>&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#586e75">// application configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>registry&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">))&lt;/span> &lt;span style="color:#586e75">// registry configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>reference&lt;span style="color:#719e07">(&lt;/span>demoServiceReference&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#586e75">// add ReferenceConfig
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#719e07">.&lt;/span>service&lt;span style="color:#719e07">(&lt;/span>fooServiceReference&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>start&lt;span style="color:#719e07">();&lt;/span> &lt;span style="color:#586e75">// Start Dubbo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">// use demoService like local bean
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> &lt;span style="color:#586e75">// Obtain the remote service interface proxy through Interface, without relying on the ReferenceConfig object
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> DemoService demoService &lt;span style="color:#719e07">=&lt;/span> DubboBootstrap&lt;span style="color:#719e07">.&lt;/span>getInstance&lt;span style="color:#719e07">().&lt;/span>getCache&lt;span style="color:#719e07">().&lt;/span>get&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> demoService&lt;span style="color:#719e07">.&lt;/span>sayHello&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;Dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FooService fooService &lt;span style="color:#719e07">=&lt;/span> DubboBootstrap&lt;span style="color:#719e07">.&lt;/span>getInstance&lt;span style="color:#719e07">().&lt;/span>getCache&lt;span style="color:#719e07">().&lt;/span>get&lt;span style="color:#719e07">(&lt;/span>FooService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fooService&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">greeting&lt;/span>&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;Dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="other-configuration">Other configuration&lt;/h2>
&lt;ul>
&lt;li>basic configuration&lt;/li>
&lt;li>Method level configuration&lt;/li>
&lt;li>Point-to-point direct connection&lt;/li>
&lt;/ul>
&lt;p>The API provides the most flexible and rich configuration capabilities, the following are some examples of configurable components.&lt;/p>
&lt;h4 id="basic-configuration">basic configuration&lt;/h4>
&lt;p>Global basic configuration can be set in DubboBootstrap, including application configuration, protocol configuration, registration center, configuration center, metadata center, module, monitoring, SSL, provider configuration, consumer configuration, etc.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// registry
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>RegistryConfig registry &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> RegistryConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>registry&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://192.168.10.1:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// service provider protocol configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ProtocolConfig protocol &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ProtocolConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>protocol&lt;span style="color:#719e07">.&lt;/span>setName&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>protocol&lt;span style="color:#719e07">.&lt;/span>setPort&lt;span style="color:#719e07">(&lt;/span>12345&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>protocol&lt;span style="color:#719e07">.&lt;/span>setThreads&lt;span style="color:#719e07">(&lt;/span>200&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// configuration center
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ConfigCenterConfig configCenter &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ConfigCenterConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>configCenter&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://192.168.10.2:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// metadata center
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>MetadataReportConfig metadataReport &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> MetadataReportConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadataReport&lt;span style="color:#719e07">.&lt;/span>setAddress&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zookeeper://192.168.10.3:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// Metrics
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>MetricsConfig metrics &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> MetricsConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metrics&lt;span style="color:#719e07">.&lt;/span>setProtocol&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// SSL
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>SslConfig ssl &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> SslConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ssl&lt;span style="color:#719e07">.&lt;/span>setServerKeyCertChainPath&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;/path/ssl/server-key-cert-chain&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ssl&lt;span style="color:#719e07">.&lt;/span>setServerPrivateKeyPath&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;/path/ssl/server-private-key&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// Provider configuration (ServiceConfig default configuration)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ProviderConfig provider &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ProviderConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>provider&lt;span style="color:#719e07">.&lt;/span>setGroup&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>provider&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// Consumer configuration (ReferenceConfig default configuration)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ConsumerConfig consumer &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ConsumerConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>consumer&lt;span style="color:#719e07">.&lt;/span>setGroup&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>consumer&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>consumer&lt;span style="color:#719e07">.&lt;/span>setTimeout&lt;span style="color:#719e07">(&lt;/span>2000&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DubboBootstrap&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">getInstance&lt;/span>&lt;span style="color:#719e07">()&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>application&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demo-app&amp;#34;&lt;/span>&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>registry&lt;span style="color:#719e07">(&lt;/span>registry&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>protocol&lt;span style="color:#719e07">(&lt;/span>protocol&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>configCenter&lt;span style="color:#719e07">(&lt;/span>configCenter&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>metadataReport&lt;span style="color:#719e07">(&lt;/span>metadataReport&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>module&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> ModuleConfig&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;module&amp;#34;&lt;/span>&lt;span style="color:#719e07">))&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>metrics&lt;span style="color:#719e07">(&lt;/span>metrics&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>ssl &lt;span style="color:#719e07">(&lt;/span>ssl&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>provider&lt;span style="color:#719e07">(&lt;/span>provider&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>consumer&lt;span style="color:#719e07">(&lt;/span>consumer&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">.&lt;/span>start&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="method-level-settings">Method level settings&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// method-level configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>List&lt;span style="color:#719e07">&amp;lt;&lt;/span>MethodConfig&lt;span style="color:#719e07">&amp;gt;&lt;/span> methods &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ArrayList&lt;span style="color:#719e07">&amp;lt;&lt;/span>MethodConfig&lt;span style="color:#719e07">&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>MethodConfig method &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> MethodConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>method&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">setName&lt;/span>&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;sayHello&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>method&lt;span style="color:#719e07">.&lt;/span>setTimeout&lt;span style="color:#719e07">(&lt;/span>10000&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>method&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">setRetries&lt;/span>&lt;span style="color:#719e07">(&lt;/span>0&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>methods&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">add&lt;/span>&lt;span style="color:#719e07">(&lt;/span>method&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// reference the remote service
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> reference &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;();&lt;/span> &lt;span style="color:#586e75">// This instance is very heavy and encapsulates the connection with the registry and the provider, please cache it yourself, otherwise it may cause memory and connection leaks
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>reference&lt;span style="color:#719e07">.&lt;/span>setMethods&lt;span style="color:#719e07">(&lt;/span>methods&lt;span style="color:#719e07">);&lt;/span> &lt;span style="color:#586e75">// Set method-level configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="point-to-point-direct-connection">Point-to-point direct connection&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// This instance is very heavy, it encapsulates the connection with the registry and the provider, please cache it yourself, otherwise it may cause memory and connection leaks
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;&lt;/span> reference &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ReferenceConfig&lt;span style="color:#719e07">&amp;lt;&lt;/span>DemoService&lt;span style="color:#719e07">&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// If point-to-point direct connection, you can use reference.setUrl() to specify the target address. After setting the url, the registration center will be bypassed.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// Among them, the protocol corresponds to the value of provider.setProtocol(), and the port corresponds to the value of provider.setPort().
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// The path corresponds to the value of service.setPath(). If no path is set, the default path is the interface name
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>reference&lt;span style="color:#719e07">.&lt;/span>setUrl&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo://10.20.130.230:20880/com.xxx.DemoService&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs3-V2: Annotation configuration</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/annotation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/annotation/</guid><description>
&lt;p>This article uses the Spring Boot + Annotation mode to describe Dubbo application development. Check out the Spring Annotation development mode without Spring Boot here [complete example](&lt;a href="https://github.com/apache/dubbo-samples/tree/master/1-basic/">https://github.com/apache/dubbo-samples/tree/master/1-basic/&lt;/a> dubbo-samples-annotation)&lt;/p>
&lt;p>In Dubbo Spring Boot development, you only need to add a few annotations and configure the &lt;code>application.properties&lt;/code> or &lt;code>application.yml&lt;/code> file to complete the Dubbo service definition:&lt;/p>
&lt;ul>
&lt;li>Annotations include &lt;code>@DubboService&lt;/code>, &lt;code>@DubboReference&lt;/code> and &lt;code>EnableDubbo&lt;/code>. Among them, &lt;code>@DubboService&lt;/code> and &lt;code>@DubboReference&lt;/code> are used to mark Dubbo services, and &lt;code>EnableDubbo&lt;/code> starts Dubbo-related configuration and specifies the Spring Boot scanning package path.&lt;/li>
&lt;li>Configuration file &lt;code>application.properties&lt;/code> or &lt;code>application.yml&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>For complete examples of the following content, please refer to &lt;a href="https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-spring-boot">dubbo-samples&lt;/a>&lt;/p>
&lt;h2 id="add-maven-dependency">Add Maven dependency&lt;/h2>
&lt;p>Use Dubbo Spring Boot Starter to first introduce the following Maven dependencies&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependencyManagement&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependencies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- Spring Boot --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.springframework.boot&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>spring-boot-dependencies&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;version&amp;gt;&lt;/span>${spring-boot.version}&lt;span style="color:#268bd2">&amp;lt;/version&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;type&amp;gt;&lt;/span>pom&lt;span style="color:#268bd2">&amp;lt;/type&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;scope&amp;gt;&lt;/span>import&lt;span style="color:#268bd2">&amp;lt;/scope&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- Dubbo --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.apache.dubbo&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>dubbo-bom&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;version&amp;gt;&lt;/span>${dubbo.version}&lt;span style="color:#268bd2">&amp;lt;/version&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;type&amp;gt;&lt;/span>pom&lt;span style="color:#268bd2">&amp;lt;/type&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;scope&amp;gt;&lt;/span>import&lt;span style="color:#268bd2">&amp;lt;/scope&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- Zookeeper --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- NOTICE: Dubbo only provides dependency management module for Zookeeper, add Nacos or other product dependency directly if you want to use them. --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.apache.dubbo&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>dubbo-dependencies-zookeeper&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;version&amp;gt;&lt;/span>${dubbo.version}&lt;span style="color:#268bd2">&amp;lt;/version&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;type&amp;gt;&lt;/span>pom&lt;span style="color:#268bd2">&amp;lt;/type&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependencies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependencyManagement&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then add it to the pom of the corresponding module&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependencies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- dubbo --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.apache.dubbo&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>dubbo&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.apache.dubbo&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>dubbo-dependencies-zookeeper&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;type&amp;gt;&lt;/span>pom&lt;span style="color:#268bd2">&amp;lt;/type&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- dubbo starter --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.apache.dubbo&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>dubbo-spring-boot-starter&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">&amp;lt;!-- spring starter --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.springframework.boot&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>spring-boot-starter&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;groupId&amp;gt;&lt;/span>org.springframework.boot&lt;span style="color:#268bd2">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;artifactId&amp;gt;&lt;/span>spring-boot-autoconfigure&lt;span style="color:#268bd2">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependency&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dependencies&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>Distinguish between ** and ** above&lt;/p>
&lt;/blockquote>
&lt;h2 id="applicationyml-or-applicationproperties">application.yml or application.properties&lt;/h2>
&lt;p>Components other than service and reference can be set in the application.yml file. If you want to extend the annotation configuration of service or reference, you need to add &lt;code>dubbo.properties&lt;/code> configuration file or use other non-annotation methods such as Java Config. For details, please See [Extended Annotation Configuration](#Extended Annotation Configuration) below.&lt;/p>
&lt;p>Service and reference components can also be associated with global components in the application through &lt;code>id&lt;/code>, take the following configuration as an example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">dubbo&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">application&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">name&lt;/span>: dubbo-springboot-demo-provider
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">protocol&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">name&lt;/span>: dubbo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">port&lt;/span>: -&lt;span style="color:#2aa198">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">registry&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">id&lt;/span>: zk-registry
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: zookeeper://127.0.0.1:2181
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">config-center&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: zookeeper://127.0.0.1:2181
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">metadata-report&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: zookeeper://127.0.0.1:2181
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Associate the service with the specific registry defined above via annotations&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@DubboService&lt;/span>&lt;span style="color:#719e07">(&lt;/span>registry&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zk-registry&amp;#34;&lt;/span>&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> DemoService &lt;span style="color:#719e07">{}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The same is true for association through Java Config configuration&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@Configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">ProviderConfiguration&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@Bean&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> ServiceConfig &lt;span style="color:#268bd2">demoService&lt;/span>&lt;span style="color:#719e07">()&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ServiceConfig service &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRegistry&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;zk-registry&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">return&lt;/span> service&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="annotation">Annotation&lt;/h2>
&lt;h3 id="dubboservice-annotation">@DubboService annotation&lt;/h3>
&lt;blockquote>
&lt;p>The &lt;code>@Service&lt;/code> annotation has been deprecated since version 3.0, use &lt;code>@DubboService&lt;/code> to distinguish it from Spring&amp;rsquo;s &lt;code>@Service&lt;/code> annotation&lt;/p>
&lt;/blockquote>
&lt;p>After defining the Dubbo service interface, provide the implementation logic of the service interface and mark it with &lt;code>@DubboService&lt;/code> annotation to realize the service exposure of Dubbo&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@DubboService&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> DemoService &lt;span style="color:#719e07">{}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you want to set service parameters, &lt;code>@DubboService&lt;/code> also provides a way to set common parameters. If you have more complex parameter setting requirements, you can consider using other setting methods&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@DubboService&lt;/span>&lt;span style="color:#719e07">(&lt;/span>version &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> group &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;dev&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> timeout &lt;span style="color:#719e07">=&lt;/span> 5000&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> DemoService &lt;span style="color:#719e07">{}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="dubboreference-annotation">@DubboReference annotation&lt;/h3>
&lt;blockquote>
&lt;p>The &lt;code>@Reference&lt;/code> annotation has been deprecated since version 3.0, use &lt;code>@DubboReference&lt;/code> to distinguish it from Spring&amp;rsquo;s &lt;code>@Reference&lt;/code> annotation&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@Component&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoClient&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@DubboReference&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">private&lt;/span> DemoService demoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>@DubboReference&lt;/code> annotation will be automatically injected as a Dubbo service proxy instance, and remote service calls can be initiated using demoService&lt;/p>
&lt;h3 id="enabledubbo-annotation">@EnableDubbo annotation&lt;/h3>
&lt;p>The &lt;code>@EnableDubbo&lt;/code> annotation must be configured, otherwise the service defined by the Dubbo annotation will not be loaded, &lt;code>@EnableDubbo&lt;/code> can be defined on the main class&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@SpringBootApplication&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@EnableDubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">ProviderApplication&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#268bd2">throws&lt;/span> Exception &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> SpringApplication&lt;span style="color:#719e07">.&lt;/span>run&lt;span style="color:#719e07">(&lt;/span>ProviderApplication&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">,&lt;/span> args&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Spring Boot annotations will only scan the package where the main class is located by default. If the service is defined in other packages, you need to add the configuration &lt;code>EnableDubbo(scanBasePackages = {&amp;quot;org.apache.dubbo.springboot.demo.provider&amp;quot;})&lt;/code>&lt;/p>
&lt;h3 id="extended-annotation-configuration">Extended annotation configuration&lt;/h3>
&lt;p>Although the configuration parameters can be adjusted through &lt;code>@DubboService&lt;/code> and &lt;code>DubboReference&lt;/code> (as shown in the code snippet below), overall the configuration items provided by annotations are still very limited. In this case, if there are more complex parameter setting requirements, you can use &lt;code>Java Config&lt;/code> or &lt;code>dubbo.properties&lt;/code> two ways.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@DubboService&lt;/span>&lt;span style="color:#719e07">(&lt;/span>version &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> group &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;dev&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> timeout &lt;span style="color:#719e07">=&lt;/span> 5000&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@DubboReference&lt;/span>&lt;span style="color:#719e07">(&lt;/span>version &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> group &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;dev&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> timeout &lt;span style="color:#719e07">=&lt;/span> 5000&lt;span style="color:#719e07">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="use-java-config-instead-of-annotations">Use Java Config instead of annotations&lt;/h3>
&lt;p>Note that Java Config is an alternative to &lt;code>DubboService&lt;/code> or &lt;code>DubboReference&lt;/code>, which is recommended for services with complex configuration requirements.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">@Configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">ProviderConfiguration&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@Bean&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> ServiceConfig &lt;span style="color:#268bd2">demoService&lt;/span>&lt;span style="color:#719e07">()&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ServiceConfig service &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ServiceConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setInterface&lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">.&lt;/span>class&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setRef&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> DemoServiceImpl&lt;span style="color:#719e07">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setGroup&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dev&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span>setVersion&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;1.0.0&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Map&lt;span style="color:#719e07">&amp;lt;&lt;/span>String&lt;span style="color:#719e07">,&lt;/span> String&lt;span style="color:#719e07">&amp;gt;&lt;/span> parameters &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> HashMap&lt;span style="color:#719e07">&amp;lt;&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> service&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">setParameters&lt;/span>&lt;span style="color:#719e07">(&lt;/span>parameters&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">return&lt;/span> service&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="supplementary-configuration-through-dubboproperties">Supplementary configuration through dubbo.properties&lt;/h3>
&lt;p>For scenarios using &lt;code>DubboService&lt;/code> or &lt;code>DubboReference&lt;/code>, you can use dubbo.properties as a configuration supplement, [specific format](../principle/#1-configuration format) is explained in more detail here.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.service.org.apache.dubbo.springboot.demo.DemoService.timeout&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">5000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.service.org.apache.dubbo.springboot.demo.DemoService.parameters&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">[{myKey:myValue},{anotherKey:anotherValue}]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.springboot.demo.DemoService.timeout&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">6000&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>Properties format configuration is currently not very structural, for example, the key field is more redundant, and support for yaml format will be considered in the future.&lt;/p>
&lt;/blockquote></description></item><item><title>Docs3-V2: XML Configuration</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/xml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/xml/</guid><description>
&lt;p>Dubbo has custom configuration components based on Spring Schema extensions, and the configuration capabilities that can be achieved using XML are generally equivalent to &lt;a href="../properties">Configuration Reference Manual&lt;/a>.&lt;/p>
&lt;p>For complete examples of the following content, please refer to &lt;a href="https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-spring-xml">dubbo-samples&lt;/a>&lt;/p>
&lt;h2 id="service-provider">service provider&lt;/h2>
&lt;h3 id="define-service-interface">Define service interface&lt;/h3>
&lt;p>DemoService.java:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">package&lt;/span> org.apache.dubbo.demo&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">interface&lt;/span> &lt;span style="color:#268bd2">DemoService&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String &lt;span style="color:#268bd2">sayHello&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String name&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="implement-the-interface-on-the-service-provider-side">Implement the interface on the service provider side&lt;/h3>
&lt;p>DemoServiceImpl.java:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">package&lt;/span> org.apache.dubbo.demo.provider&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">import&lt;/span> org.apache.dubbo.demo.DemoService&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> DemoService &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> String &lt;span style="color:#268bd2">sayHello&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String name&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#2aa198">&amp;#34;Hello &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> name&lt;span style="color:#719e07">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="expose-services-with-spring-configuration-declarations">Expose services with Spring configuration declarations&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;beans&lt;/span> xmlns:xsi=&lt;span style="color:#2aa198">&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xmlns:dubbo=&lt;span style="color:#2aa198">&amp;#34;http://dubbo.apache.org/schema/dubbo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xmlns=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/beans&amp;#34;&lt;/span> xmlns:context=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/context&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xsi:schemaLocation=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#2aa198"> http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework .org/schema/context/spring-context.xsd&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;context:property-placeholder/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:application&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;demo-provider&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:registry&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;zookeeper://${zookeeper.address:127.0.0.1}:2181&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:provider&lt;/span> token=&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;bean&lt;/span> id=&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span> class=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.basic.impl.DemoServiceImpl&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:service&lt;/span> interface=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.basic.api.DemoService&amp;#34;&lt;/span> ref=&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/beans&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="load-spring-configuration">Load Spring configuration&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">DemoServiceImpl&lt;/span> &lt;span style="color:#268bd2">implements&lt;/span> DemoService &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">@Override&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> String &lt;span style="color:#268bd2">sayHello&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String name&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#719e07">.&lt;/span>out&lt;span style="color:#719e07">.&lt;/span>println&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;[&amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> &lt;span style="color:#719e07">new&lt;/span> SimpleDateFormat&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;HH:mm:ss&amp;#34;&lt;/span>&lt;span style="color:#719e07">).&lt;/span>format&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#719e07">new&lt;/span> Date&lt;span style="color:#719e07">())&lt;/span> &lt;span style="color:#719e07">+&lt;/span> &lt;span style="color:#2aa198">&amp;#34;] Hello &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> name &lt;span style="color:#719e07">+&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#2aa198">&amp;#34;, request from consumer: &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> RpcContext&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">getContext&lt;/span>&lt;span style="color:#719e07">().&lt;/span> getRemoteAddress&lt;span style="color:#719e07">());&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">return&lt;/span> &lt;span style="color:#2aa198">&amp;#34;Hello &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> name &lt;span style="color:#719e07">+&lt;/span> &lt;span style="color:#2aa198">&amp;#34;, response from provider: &amp;#34;&lt;/span> &lt;span style="color:#719e07">+&lt;/span> RpcContext&lt;span style="color:#719e07">.&lt;/span>getContext&lt;span style="color:#719e07">().&lt;/span>getLocalAddress&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="service-consumer">Service Consumer&lt;/h2>
&lt;h3 id="reference-remote-services-through-spring-configuration">Reference remote services through Spring configuration&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;beans&lt;/span> xmlns:xsi=&lt;span style="color:#2aa198">&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xmlns:dubbo=&lt;span style="color:#2aa198">&amp;#34;http://dubbo.apache.org/schema/dubbo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xmlns=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/beans&amp;#34;&lt;/span> xmlns:context=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/context&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> xsi:schemaLocation=&lt;span style="color:#2aa198">&amp;#34;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#2aa198"> http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework .org/schema/context/spring-context.xsd&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;context:property-placeholder/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:application&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;demo-consumer&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:registry&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;zookeeper://${zookeeper.address:127.0.0.1}:2181&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:reference&lt;/span> id=&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span> check=&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span> interface=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.basic.api.DemoService&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/beans&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="load-spring-configuration-and-call-remote-service">Load Spring configuration and call remote service&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">class&lt;/span> &lt;span style="color:#268bd2">BasicConsumer&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">public&lt;/span> &lt;span style="color:#268bd2">static&lt;/span> &lt;span style="color:#dc322f">void&lt;/span> &lt;span style="color:#268bd2">main&lt;/span>&lt;span style="color:#719e07">(&lt;/span>String&lt;span style="color:#719e07">[]&lt;/span> args&lt;span style="color:#719e07">)&lt;/span> &lt;span style="color:#719e07">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ClassPathXmlApplicationContext context &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ClassPathXmlApplicationContext&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;spring/dubbo-demo-consumer.xml&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> context&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">start&lt;/span>&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DemoService demoService &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">(&lt;/span>DemoService&lt;span style="color:#719e07">)&lt;/span> context&lt;span style="color:#719e07">.&lt;/span> &lt;span style="color:#268bd2">getBean&lt;/span>&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;demoService&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> String hello &lt;span style="color:#719e07">=&lt;/span> demoService&lt;span style="color:#719e07">.&lt;/span>sayHello&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;world&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> System&lt;span style="color:#719e07">.&lt;/span>out&lt;span style="color:#719e07">.&lt;/span>println&lt;span style="color:#719e07">(&lt;/span>hello&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#719e07">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs3-V2: How Configuration Works</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/principle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/principle/</guid><description>
&lt;p>The following is an example of Dubbo property configuration &lt;a href="https://github.com/apache/dubbo-spring-boot-project/tree/master/dubbo-spring-boot-samples">dubbo-spring-boot-samples&lt;/a>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">## application.properties&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Spring boot application&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> spring.application.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo-externalized-configuration-provider-sample&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubbo.scan.base-packages&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">com.alibaba.boot.dubbo.demo.provider.service&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75"># Dubbo Application&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">## The default value of dubbo.application.name is ${spring.application.name}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">## dubbo.application.name=${spring.application.name}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">#Dubbo Protocol&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubbo.protocol.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubbo.protocol.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">12345&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">## Dubbo Registry&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubbo.registry.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">N/A&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#586e75">## service default version&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubbo.provider.version&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">1.0.0&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Next, around this example, we analyze the working principle of Dubbo configuration from three aspects: configuration format, configuration source, and loading process.&lt;/p>
&lt;h2 id="1-configuration-format">1 configuration format&lt;/h2>
&lt;p>All configurations currently supported by Dubbo are in &lt;code>.properties&lt;/code> format, including &lt;code>-D&lt;/code>, &lt;code>Externalized Configuration&lt;/code>, etc. All configuration items in &lt;code>.properties&lt;/code> follow a &lt;code>path-based&lt;/code> configuration format.&lt;/p>
&lt;p>In the Spring application, you can also put the attribute configuration in &lt;code>application.yml&lt;/code>, and the tree hierarchy is more readable.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Application-level configuration (no id)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Instance-level configuration (specify id or name)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-id}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Service interface configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.service.{interface-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.{interface-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># method configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.service.{interface-name}.{method-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.{interface-name}.{method-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Method argument configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.{interface-name}.{method-name}.{argument-index}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="11-application-level-configuration-no-id">1.1 Application-level configuration (no id)&lt;/h3>
&lt;p>The format of application-level configuration is: configuration type singular prefix, no id/name.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Application-level configuration (no id)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Similar to &lt;code>application&lt;/code>, &lt;code>monitor&lt;/code>, &lt;code>metrics&lt;/code>, etc. are all application-level components, so only a single instance is allowed to be configured; while &lt;code>protocol&lt;/code>, &lt;code>registry&lt;/code>, etc. allow to configure multiple components, when only singleton configuration is required , in the format described in this section. Common examples are as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.application.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">demo-provider&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.application.qos-enable&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registry.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2181&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">-1&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="12-instance-level-configuration-specify-id-or-name">1.2 Instance-level configuration (specify id or name)&lt;/h3>
&lt;p>The attribute configuration for an instance needs to specify an id or name, and its prefix format is: configuration type plural prefix + id/name. Applicable to &lt;code>protocol&lt;/code>, &lt;code>registry&lt;/code> and other components that support multiple configurations.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Instance-level configuration (specify id or name)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-id}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>If there is no instance of the id or name, the framework will create a configuration component instance based on the properties listed here.&lt;/li>
&lt;li>If an instance with the same id or name already exists, the framework will use the attributes listed here as a supplement to the existing instance configuration. For details, please refer to [Attribute Override](../principle#32-Attribute Override).&lt;/li>
&lt;li>Please refer to the [single and plural configuration comparison table] (../principle#17-single and plural configuration item comparison table)&lt;/li>
&lt;/ul>
&lt;p>Configuration example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.registries.unit1.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2181&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registries.unit2.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2182&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocols.dubbo.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocols.dubbo.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">20880&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocols.hessian.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">hessian&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocols.hessian.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">8089&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="13-service-interface-configuration">1.3 Service interface configuration&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.service.org.apache.dubbo.samples.api.DemoService.timeout&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">5000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.timeout&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">6000&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="method-configuration">Method configuration&lt;/h3>
&lt;p>Method configuration format:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># method configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.service.{interface-name}.{method-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.{interface-name}.{method-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Method argument configuration&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.{interface-name}.{method-name}.{argument-index}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Example method configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.sayHello.timeout&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">7000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.sayHello.oninvoke&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">notifyService.onInvoke&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.sayHello.onreturn&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">notifyService.onReturn&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.sayHello.onthrow&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">notifyService.onThrow&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.sayHello.0.callback&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">true&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Equivalent to XML configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:reference&lt;/span> interface=&lt;span style="color:#2aa198">&amp;#34;org.apache.dubbo.samples.api.DemoService&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:method&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;sayHello&amp;#34;&lt;/span> timeout=&lt;span style="color:#2aa198">&amp;#34;7000&amp;#34;&lt;/span> oninvoke=&lt;span style="color:#2aa198">&amp;#34;notifyService.onInvoke&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> onreturn=&lt;span style="color:#2aa198">&amp;#34;notifyService.onReturn&amp;#34;&lt;/span> onthrow=&lt;span style="color:#2aa198">&amp;#34;notifyService.onThrow&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:argument&lt;/span> index=&lt;span style="color:#2aa198">&amp;#34;0&amp;#34;&lt;/span> callback=&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;/dubbo:method&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/dubbo:reference&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="14-parameter-configuration">1.4 Parameter configuration&lt;/h3>
&lt;p>The parameters parameter is a map object, which supports configuration in the form of xxx.parameters=[{key:value},{key:value}].&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>dubbo.application.parameters&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">[{item1:value1},{item2:value2}]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.reference.org.apache.dubbo.samples.api.DemoService.parameters&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">[{item3:value3}]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="15-transport-layer-configuration">1.5 Transport layer configuration&lt;/h3>
&lt;p>The triple protocol uses Http2 as the underlying communication protocol, allowing users to customize [6 settings parameters] of Http2 (&lt;a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2">https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2&lt;/a>)&lt;/p>
&lt;p>The configuration format is as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Notify the peer header of the upper limit of compressed index tables&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.header-table-size&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">4096&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Enable server-side push function&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.enable-push&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Notify the peer of the maximum number of concurrent streams allowed&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.max-concurrent-streams&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">2147483647&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Declare the window size of the sender&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.initial-window-size&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">1048576&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Set the maximum number of bytes for the frame&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.max-frame-size&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">32768&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Notify the peer of the maximum number of uncompressed bytes in the header&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.rpc.tri.max-header-list-size&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">8192&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Equivalent to yml configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">dubbo&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">rpc&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">tri&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">header-table-size&lt;/span>: &lt;span style="color:#2aa198">4096&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">enable-push&lt;/span>: &lt;span style="color:#cb4b16">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">max-concurrent-streams&lt;/span>: &lt;span style="color:#2aa198">2147483647&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">initial-window-size&lt;/span>: &lt;span style="color:#2aa198">1048576&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">max-frame-size&lt;/span>: &lt;span style="color:#2aa198">32768&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">max-header-list-size&lt;/span>: &lt;span style="color:#2aa198">8192&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="16-attribute-and-xml-configuration-mapping-rules">1.6 Attribute and XML configuration mapping rules&lt;/h3>
&lt;p>The xml tag name and attribute name can be combined, separated by &amp;lsquo;.&amp;rsquo;. One attribute per line.&lt;/p>
&lt;ul>
&lt;li>&lt;code>dubbo.application.name=foo&lt;/code> is equivalent to &lt;code>&amp;lt;dubbo:application name=&amp;quot;foo&amp;quot; /&amp;gt;&lt;/code>&lt;/li>
&lt;li>&lt;code>dubbo.registry.address=10.20.153.10:9090&lt;/code> is equivalent to &lt;code>&amp;lt;dubbo:registry address=&amp;quot;10.20.153.10:9090&amp;quot; /&amp;gt; &lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If there is more than one tag in xml configuration, then you can use &amp;lsquo;id&amp;rsquo; to differentiate. If you don&amp;rsquo;t specify an id, it will apply to all tags.&lt;/p>
&lt;ul>
&lt;li>&lt;code>dubbo.protocols.rmi.port=1099&lt;/code> is equivalent to &lt;code>&amp;lt;dubbo:protocol id=&amp;quot;rmi&amp;quot; name=&amp;quot;rmi&amp;quot; port=&amp;quot;1099&amp;quot; /&amp;gt; &lt;/code>&lt;/li>
&lt;li>&lt;code>dubbo.registries.china.address=10.20.153.10:9090&lt;/code> is equivalent to &lt;code>&amp;lt;dubbo:registry id=&amp;quot;china&amp;quot; address=&amp;quot;10.20.153.10:9090&amp;quot; /&amp;gt;&lt;/code>&lt;/li>
&lt;/ul>
&lt;h3 id="17-single-and-plural-comparison-table-for-configuration-items">1.7 Single and plural comparison table for configuration items&lt;/h3>
&lt;p>Plural configurations are named in the same way as regular words are pluralized:&lt;/p>
&lt;ol>
&lt;li>When the letter y ends, remove y and change to ies&lt;/li>
&lt;li>At the end of the letter s, add es&lt;/li>
&lt;li>Others add s&lt;/li>
&lt;/ol>
&lt;p>| Config Type | Singular Configuration | Plural Configuration |
| &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; | &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; | &amp;mdash;- &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- |
| application | dubbo.application.xxx=xxx | dubbo.applications.{id}.xxx=xxx &lt;br/> dubbo.applications.{name}.xxx=xxx |
| protocol | dubbo.protocol.xxx=xxx | dubbo.protocols.{id}.xxx=xxx &lt;br/> dubbo.protocols.{name}.xxx=xxx |
| module | dubbo.module.xxx=xxx | dubbo.modules.{id}.xxx=xxx &lt;br/> dubbo.modules.{name}.xxx=xxx |
| registry | dubbo.registry.xxx=xxx | dubbo.registries.{id}.xxx=xxx |
| monitor | dubbo.monitor.xxx=xxx | dubbo.monitors.{id}.xxx=xxx |
| config-center | dubbo.config-center.xxx=xxx | dubbo.config-centers.{id}.xxx=xxx |
| metadata-report | dubbo.metadata-report.xxx=xxx | dubbo.metadata-reports.{id}.xxx=xxx |
| ssl | dubbo.ssl.xxx=xxx | dubbo.ssls.{id}.xxx=xxx |
| metrics | dubbo.metrics.xxx=xxx | dubbo.metricses.{id}.xxx=xxx |
| provider | dubbo.provider.xxx=xxx | dubbo.providers.{id}.xxx=xxx |
| consumer | dubbo.consumer.xxx=xxx | dubbo.consumers.{id}.xxx=xxx |
| service | dubbo.service.{interfaceName}.xxx=xxx | None |
| reference | dubbo.reference.{interfaceName}.xxx=xxx | None |
| method | dubbo.service.{interfaceName}.{methodName}.xxx=xxx &lt;br/> dubbo.reference.{interfaceName}.{methodName}.xxx=xxx | None |
| argument | dubbo.service.{interfaceName}.{methodName}.{arg-index}.xxx=xxx | None |&lt;/p>
&lt;h2 id="2-configure-sources">2 Configure sources&lt;/h2>
&lt;p>Dubbo supports 6 configuration sources by default:&lt;/p>
&lt;ul>
&lt;li>JVM System Properties, JVM -D parameter&lt;/li>
&lt;li>System environment, the environment variable of the JVM process&lt;/li>
&lt;li>Externalized Configuration, [externalized configuration] (#33-externalized configuration), read from the configuration center&lt;/li>
&lt;li>Application Configuration, application attribute configuration, extract the attribute set starting with &amp;ldquo;dubbo&amp;rdquo; from the Spring application Environment&lt;/li>
&lt;li>The configuration collected by programming interfaces such as API/XML/annotation can be understood as a kind of configuration source, which is a configuration collection method directly oriented to user programming&lt;/li>
&lt;li>Read configuration file dubbo.properties from classpath&lt;/li>
&lt;/ul>
&lt;p>About the dubbo.properties attribute:&lt;/p>
&lt;ol>
&lt;li>If there is more than one dubbo.properties file under the classpath, for example, two jar packages each contain dubbo.properties, dubbo will randomly select one to load and print an error log.&lt;/li>
&lt;li>Dubbo can automatically load dubbo.properties in the root directory of the classpath, but you can also use JVM parameters to specify the path: &lt;code>-Ddubbo.properties.file=xxx.properties&lt;/code>.&lt;/li>
&lt;/ol>
&lt;h3 id="21-coverage-relationship">2.1 Coverage relationship&lt;/h3>
&lt;p>If the same configuration item is specified through multiple configuration sources, configuration items will overlap each other. Please refer to the next section for specific coverage relationship and priority.&lt;/p>
&lt;h2 id="3-configuration-loading-process">3 Configuration loading process&lt;/h2>
&lt;h3 id="31-processing-flow">3.1 Processing flow&lt;/h3>
&lt;p>Dubbo configuration loading is roughly divided into two stages:&lt;/p>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/v3/config/config-load.svg" alt="Configuration loading process">&lt;/p>
&lt;ul>
&lt;li>The first stage is before the initialization of DubboBootstrap, parse and process the XML configuration/annotation configuration/Java-config or execute the API configuration code when the Spring context starts, create a config bean and add it to the ConfigManager.&lt;/li>
&lt;li>The second stage is the DubboBootstrap initialization process, which reads the external configuration from the configuration center, processes instance-level attribute configuration and application-level attribute configuration in turn, and finally refreshes the attributes of all configuration instances, that is, [property override](../principle#32 -property override).&lt;/li>
&lt;/ul>
&lt;h3 id="32-property-override">3.2 Property Override&lt;/h3>
&lt;p>There may be two situations where property overriding occurs, and the two may occur at the same time:&lt;/p>
&lt;ol>
&lt;li>The same configuration item is configured in different configuration sources&lt;/li>
&lt;li>The same configuration source, but the same configuration item is specified at different levels&lt;/li>
&lt;/ol>
&lt;h4 id="321-different-configuration-sources">3.2.1 Different configuration sources&lt;/h4>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/blog/configuration.jpg" alt="Override relationship">&lt;/p>
&lt;h4 id="321-same-configuration-source">3.2.1 Same configuration source&lt;/h4>
&lt;p>Property override refers to overriding the properties of the config bean instance with the configured property values, similar to Spring [PropertyOverrideConfigurer](&lt;a href="https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/">https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/&lt;/a> factory/config/PropertyOverrideConfigurer.html) .&lt;/p>
&lt;blockquote>
&lt;p>Property resource configurer that overrides bean property values in an application context definition. It pushes values from a properties file into bean definitions.
Configuration lines are expected to be of the following form:&lt;/p>
&lt;p>beanName.property=value&lt;/p>
&lt;/blockquote>
&lt;p>But the difference from &lt;code>PropertyOverrideConfigurer&lt;/code> is that Dubbo&amp;rsquo;s property override has multiple matching formats, and the priority from high to low is:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">#1. Instance-level configuration of the specified id&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-id}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">#2. Specify the instance-level configuration of the name&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}s.{config-name}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">#3. Application-level configuration (singular configuration)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.{config-type}.{config-item}&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">{config-item-value}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Attribute override processing flow:&lt;/p>
&lt;p>Search in order of priority from high to low. If an attribute starting with this prefix is found, use this prefix to extract the attribute and ignore the subsequent configuration.&lt;/p>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/v3/config/properties-override.svg" alt="Properties Override Process">&lt;/p>
&lt;h3 id="33-externalization-configuration">3.3 Externalization configuration&lt;/h3>
&lt;p>One of the purposes of external configuration is to achieve centralized management of configuration. There are already many mature professional configuration systems in this part of the industry, such as Apollo, Nacos, etc. What Dubbo does is mainly to ensure that it can work with these systems.&lt;/p>
&lt;p>There is no difference in content and format between externalized configuration and other local configurations. It can be simply understood as the externalized storage of &lt;code>dubbo.properties&lt;/code>. The configuration center is more suitable for extracting some public configurations such as registration centers and metadata center configurations for future use. centralized management.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># Centralized management of registration center address, metadata center address and other configurations can achieve a unified environment and reduce development-side perception.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registry.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2181&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.registry.simplified&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.metadata-report.address&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">zookeeper://127.0.0.1:2181&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.name&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">dubbo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.protocol.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">20880&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.application.qos.port&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">33333&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>
&lt;p>priority
By default, the externalized configuration has a higher priority than the local configuration, so the content configured here will override the local configuration value. There is a separate chapter explaining the [Override Relationship] (#21-Override Relationship) between various configuration forms.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>scope
There are two levels of external configuration: global and application. The global configuration is shared by all applications. The application-level configuration is maintained by each application and is only visible to itself. Currently supported extensions include Zookeeper, Apollo, and Nacos.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="331-how-to-use-external-configuration">3.3.1 How to use external configuration&lt;/h4>
&lt;ol>
&lt;li>Add config-center configuration&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:config-center&lt;/span> address=&lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="2">
&lt;li>Add global configuration items in the corresponding configuration center (zookeeper, Nacos, etc.), take Nacos as an example as follows:&lt;/li>
&lt;/ol>
&lt;p>&lt;img src="https://dubbo.apache.org/imgs/v3/config-center/nacos-extenal-properties.png" alt="nacos-extenal-properties">&lt;/p>
&lt;p>After the external configuration is enabled, global configurations such as registry, metadata-report, protocol, and qos theoretically no longer need to be configured in the application. The application development side focuses on business service configuration, and some globally shared global configurations are transferred to O&amp;amp;M. The personnel are uniformly configured in the remote configuration center.&lt;/p>
&lt;p>The effect of this is that the application only needs to care about:&lt;/p>
&lt;ul>
&lt;li>Service exposure, subscription configuration&lt;/li>
&lt;li>Configuration center address
When deployed to different environments, other configurations can be automatically read from the corresponding configuration center.&lt;/li>
&lt;/ul>
&lt;p>For example, only the following Dubbo-related configurations in each application may be sufficient, and the rest are hosted in the configuration center in the corresponding environment:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>dubbo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> application
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">name&lt;/span>: demo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> config-center
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: nacos://127.0.0.1:8848
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="332-load-external-configuration-by-itself">3.3.2 Load external configuration by itself&lt;/h4>
&lt;p>The so-called Dubbo&amp;rsquo;s support for the configuration center is essentially to pull &lt;code>.properties&lt;/code> from the remote to the local, and then integrate it with the local configuration. In theory, as long as the Dubbo framework can get the required configuration, it can start normally. It doesn&amp;rsquo;t care whether these configurations are loaded by itself or directly inserted by the application, so Dubbo also provides the following APIs to allow users to organize themselves. The configuration is stuffed into the Dubbo framework (the configuration loading process is to be completed by the user), so that the Dubbo framework no longer directly interacts with Apollo or Zookeeper to read the configuration.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-java" data-lang="java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">// The application loads its own configuration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span>Map&lt;span style="color:#719e07">&amp;lt;&lt;/span>String&lt;span style="color:#719e07">,&lt;/span> String&lt;span style="color:#719e07">&amp;gt;&lt;/span> dubboConfigurations &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> HashMap&lt;span style="color:#719e07">&amp;lt;&amp;gt;();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubboConfigurations&lt;span style="color:#719e07">.&lt;/span>put&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo.registry.address&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> &lt;span style="color:#2aa198">&amp;#34;zookeeper://127.0.0.1:2181&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> dubboConfigurations&lt;span style="color:#719e07">.&lt;/span>put&lt;span style="color:#719e07">(&lt;/span>&lt;span style="color:#2aa198">&amp;#34;dubbo.registry.simplified&amp;#34;&lt;/span>&lt;span style="color:#719e07">,&lt;/span> &lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">//Throw the organized configuration into the Dubbo framework
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75">&lt;/span> ConfigCenterConfig configCenter &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#719e07">new&lt;/span> ConfigCenterConfig&lt;span style="color:#719e07">();&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> configCenter&lt;span style="color:#719e07">.&lt;/span>setExternalConfig&lt;span style="color:#719e07">(&lt;/span>dubboConfigurations&lt;span style="color:#719e07">);&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Docs3-V2: Configuration Item Reference Manual</title><link>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/properties/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dubbo.apache.org/en/docs3-v2/java-sdk/reference-manual/config/properties/</guid><description>
&lt;h2 id="configuration-details">Configuration Details&lt;/h2>
&lt;h3 id="application">application&lt;/h3>
&lt;p>Each application must have one and only one application configuration, corresponding configuration class: &lt;code>org.apache.dubbo.config.ApplicationConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>name&lt;/td>
&lt;td>application&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The name of the current application, which is used by the registry to calculate dependencies between applications. Note: the consumer and provider application names should not be the same, this parameter is not Matching conditions, you can fill in the name of your current project, which has nothing to do with the role of the provider and consumer. For example, if the kylin application calls the service of the morgan application, the kylin project will be kylin, and the morgan project will be morgan. Maybe kylin also provides other The service is used by others, but the kylin project will always be dubbed kylin, so the registry will show that kylin depends on morgan&lt;/td>
&lt;td>version 2.7 .0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>compiler&lt;/td>
&lt;td>compiler&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>javassist&lt;/td>
&lt;td>performance optimization&lt;/td>
&lt;td>Java bytecode compiler, used to generate dynamic classes, optional: jdk or javassist&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>logger&lt;/td>
&lt;td>logger&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>slf4j&lt;/td>
&lt;td>performance optimization&lt;/td>
&lt;td>log output method, optional: slf4j, jcl, log4j, log4j2, jdk&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The person in charge of the application, used for service governance, please fill in the email prefix of the person in charge&lt;/td>
&lt;td>Version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>organization&lt;/td>
&lt;td>organization&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Organization name (BU or department), which is used by the registration center to distinguish service sources. It is recommended not to use autoconfig for this configuration item, and write it directly in the configuration, such as china, intl, itu, crm, asc, dw, aliexpress, etc.&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>architecture &lt;br class="atl-forced-newline" />&lt;/td>
&lt;td>architecture &lt;br class="atl-forced-newline" />&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>. Different architectures use different layers.&lt;/td>
&lt;td>Version 2.0. 7 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>environment&lt;/td>
&lt;td>environment&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Application environment, such as: develop/test/product, different environments use different default values, and it is only used as a restriction for developing and testing functions&lt;/td>
&lt;td>2.0.0 and above version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>application.version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>current application version&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dumpDirectory&lt;/td>
&lt;td>dump.directory&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>When the process has a problem such as the thread pool is full, the storage path of the framework&amp;rsquo;s automatic dump file&lt;/td>
&lt;td>Version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>qosEnable&lt;/td>
&lt;td>qos.enable&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service governance&lt;/td>
&lt;td>Whether to enable the qos operation and maintenance port&lt;/td>
&lt;td>Version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>qosHost&lt;/td>
&lt;td>qos.host&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Network interface address to monitor, default 0.0.0.0&lt;/td>
&lt;td>Version 2.7.3 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>qosPort&lt;/td>
&lt;td>qos.port&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>network port to monitor&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>qosAcceptForeignIp&lt;/td>
&lt;td>qos.accept.foreign.ip&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Security configuration, whether to accept external requests except localhost local access&lt;/td>
&lt;td>Version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>shutwait&lt;/td>
&lt;td>dubbo.service.shutdown.wait&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>shutdown waiting time (ms) during graceful shutdown&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>hostname&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>local hostname&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>hostname&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registerConsumer&lt;/td>
&lt;td>registerConsumer&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to register the instance to the registry. Only set to &lt;code>false&lt;/code> when the instance is a pure consumer&lt;/td>
&lt;td>Version 2.7.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>repository&lt;/td>
&lt;td>application.version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>current application version&lt;/td>
&lt;td>version 2.7.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>enableFileCache&lt;/td>
&lt;td>file.cache&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to enable local cache&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>preferred protocol, applicable when the preferred protocol cannot be determined&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>metadataType&lt;/td>
&lt;td>metadata-type&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>local&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Application-level service discovery The metadata delivery method is from the perspective of Provider, and the configuration on the Consumer side is invalid. The optional values are:&lt;br> * remote - Provider Put the metadata in the remote registry, and the Consumer gets it from the registry;&lt;br/>* local - Provider puts the metadata locally, and the Consumer gets it directly from the Provider;&lt;/td>
&lt;td>Version 2.7.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>metadataServicePort&lt;/td>
&lt;td>metadata-service-port&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>If metadataType is configured as local, this property sets the port number used by the MetadataService service&lt;/td>
&lt;td>Version 2.7.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>livenessProbe&lt;/td>
&lt;td>liveness-probe&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>concept and format corresponding to k8s system liveness probe&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>readinessProbe&lt;/td>
&lt;td>readiness-probe&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>concept and format corresponding to k8s system readiness probe&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>startupProbe&lt;/td>
&lt;td>startup-probe&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The concept and format correspond to the k8s system startup probe&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registerMode&lt;/td>
&lt;td>register-mode&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>all&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Control address registration behavior, used for application-level service discovery and migration. &lt;br/>* instance only registers application-level addresses;&lt;br/>* interface only registers interface-level addresses;&lt;br/>* all (default) registers both application-level and interface-level addresses;&lt;/td>
&lt;td>Version 3.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>enableEmptyProtection&lt;/td>
&lt;td>enable-empty-protection&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether to enable the protection of the empty address list on the consumer side globally. After enabling it, the empty address push from the registration center will be ignored. The default is true&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>None&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Reserved for extensions, any parameters can be extended and defined, and all extended parameters will be reflected in the URL configuration as they are&lt;/td>
&lt;td>Version 2.7.0 and above&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="service">service&lt;/h3>
&lt;p>A service provider exposes service configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ServiceConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>interface&lt;/td>
&lt;td>&lt;/td>
&lt;td>class&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service interface name&lt;/td>
&lt;td>version 1.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>ref&lt;/td>
&lt;td>&lt;/td>
&lt;td>object&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service object implementation reference&lt;/td>
&lt;td>version 1.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0.0.0&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service version, it is recommended to use a two-digit version, such as: 1.0, usually the version number needs to be upgraded when the interface is not compatible&lt;/td>
&lt;td>version 1.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>group&lt;/td>
&lt;td>group&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service grouping, when an interface has multiple implementations, they can be distinguished by grouping&lt;/td>
&lt;td>version 1.0.7 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>path&lt;/td>
&lt;td>&lt;path>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default interface name&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service path (note: 1.0 does not support custom path, always use the interface name, if there is 1.0 to 2.0, the configuration service path may not be Compatible)&lt;/td>
&lt;td>Version 1.0.12+&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>delay&lt;/td>
&lt;td>delay&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Delayed registration service time (milliseconds), when set to -1, it means that the service is delayed until the initialization of the Spring container is completed&lt;/td>
&lt;td>Version 1.0.14 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>timeout&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>1000&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>remote service call timeout (milliseconds)&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>retries&lt;/td>
&lt;td>retries&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>2&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The number of remote service call retries, excluding the first call, please set it to 0 if you don&amp;rsquo;t need to retry&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>connections&lt;/td>
&lt;td>connections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>100&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of connections for each provider, short connection protocols such as rmi, http, and hessian indicate the limit on the number of connections, and long connection agreements such as dubbo indicate the established long connections Number&lt;/td>
&lt;td>Version 2.0.0 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>loadbalance&lt;/td>
&lt;td>loadbalance&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>random&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>load balancing strategy, optional values: &lt;br/>* random - random; &lt;br/>* roundrobin - polling; &lt;br/>* leastactive - Least active calls; br/&amp;gt;* consistenthash - consistent hash (2.1.0+); &lt;br/>* shortestresponse - shortest response (2.7.7+);&lt;/td>
&lt;td>2.0.0+&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>async&lt;/td>
&lt;td>async&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether to execute asynchronously by default, unreliable asynchronous, just ignore the return value, do not block the execution thread&lt;/td>
&lt;td>Version above 2.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>local&lt;/td>
&lt;td>local&lt;/td>
&lt;td>class/boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>set to true, means to use the default proxy class name, that is: interface name + Local suffix, obsolete, please use stub&lt;/td>
&lt;td>2.0.0 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>stub&lt;/td>
&lt;td>stub&lt;/td>
&lt;td>class/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Set to true, which means to use the default proxy class name, that is: interface name + Stub suffix, the local proxy class name of the service interface client, used in the client The client executes local logic, such as local cache, etc. The constructor of the local proxy class must allow remote proxy objects to be passed in, such as: public XxxServiceStub(XxxService xxxService)&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>mock&lt;/td>
&lt;td>mock&lt;/td>
&lt;td>class/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Set to true, which means to use the default Mock class name, that is: interface name + Mock suffix, if the service interface fails to call the Mock implementation class , the Mock class must have A no-argument constructor, the difference from Local is that Local is always executed, while Mock is only executed when non-business exceptions (such as timeouts, network exceptions, etc.) occur, Local is executed before remote calls, and Mock is executed after remote calls .&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>token&lt;/td>
&lt;td>token&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>Consumers bypass the registration center for direct access to ensure that the authorization function of the registration center is valid. If point-to-point calls are used, the token function must be turned off&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registry&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default registration to all registries&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>registration to the specified registry, used in multiple registries, the value is the id attribute of &lt;a href="dubbo:registry">dubbo:registry&lt;/a>, used for multiple registries IDs Separated by commas, If you don&amp;rsquo;t want to register the service to any registry, you can set the value to N/A&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>provider&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>the first provider configuration is used by default&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>specify the provider, the value is the id attribute of &lt;a href="dubbo:provider">dubbo:provider&lt;/a>&lt;/td>
&lt;td>version above 2.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>deprecated&lt;/td>
&lt;td>deprecated&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service is deprecated, if set to true, the consumer will print the service deprecated warning error log&lt;/td>
&lt;td>2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dynamic&lt;/td>
&lt;td>dynamic&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service is dynamically registered, if it is set to false, the disabled status will be displayed after registration, and it needs to be manually enabled, and the registration will not be canceled automatically when the service provider stops , need to be disabled manually.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accesslog&lt;/td>
&lt;td>accesslog&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service management&lt;/td>
&lt;td>set to true, the access log will be output to the logger, and the access log file path can also be filled in to output the access log directly to the specified file&lt;/td>
&lt;td>2.0.5 and above version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>document&lt;/td>
&lt;td>document&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>service document URL&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>weight&lt;/td>
&lt;td>weight&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service weight&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>executes&lt;/td>
&lt;td>executes&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of parallel execution requests per service and method of a service provider&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>actives&lt;/td>
&lt;td>actives&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>maximum number of concurrent calls per service consumer per service per method&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proxy&lt;/td>
&lt;td>proxy&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>javassist&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>generate dynamic proxy, optional: jdk/javassist&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cluster&lt;/td>
&lt;td>cluster&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>failover&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>cluster mode, optional: failover/failfast/failsafe/failback/forking/available/mergeable (2.1. )/zone-aware (version 2.7.5 or later)&lt;/td>
&lt;td>version 2.0 .5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>filter&lt;/td>
&lt;td>service.filter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service provider remote call process interceptor name, multiple names separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>listener&lt;/td>
&lt;td>exporter.listener&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service provider export service listener name, multiple names separated by commas&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>use the specified protocol to expose the service, used in multi-protocol, the value is the id attribute of &lt;a href="dubbo:protocol">dubbo:protocol&lt;/a>, multiple protocol IDs are separated by commas&lt;/td>
&lt;td>version 2.0 .5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>layer&lt;/td>
&lt;td>layer&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>the layer where the service provider resides. Such as: biz, dao, intl:web, china:acton.&lt;/td>
&lt;td>Version 2.0.7 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>register&lt;/td>
&lt;td>register&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the service of this protocol is registered to the registry&lt;/td>
&lt;td>version 2.0.8 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>validation&lt;/td>
&lt;td>validation&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to enable JSR303 standard annotation validation, if enabled, the annotations on the method parameters will be validated&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>None&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Reserved for extensions, any parameters can be extended and defined, and all extended parameters will be reflected in the URL configuration as they are&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="reference">reference&lt;/h3>
&lt;p>A service consumer references a service configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ReferenceConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>id&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>service reference BeanId&lt;/td>
&lt;td>version 1.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>interface&lt;/td>
&lt;td>&lt;/td>
&lt;td>class&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service interface name&lt;/td>
&lt;td>version 1.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service version, consistent with the version of the service provider&lt;/td>
&lt;td>version above 1.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>group&lt;/td>
&lt;td>group&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service grouping, when an interface has multiple implementations, they can be distinguished by grouping, must be consistent with the service provider&lt;/td>
&lt;td>version 1.0.7 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>timeout&lt;/td>
&lt;td>long&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>timeout of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a> is used by default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service method call timeout (milliseconds)&lt;/td>
&lt;td>version 1.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>retries&lt;/td>
&lt;td>retries&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>retries of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a> are used by default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>retries of remote service calls, excluding the first call, please set to 0&lt;/td>
&lt;td>2.0. Version 0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>connections&lt;/td>
&lt;td>connections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default connections of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of connections for each provider, rmi, http, hessian and other short connection protocols indicate the limit of the number of connections, dubbo The equal-length connection association indicates the number of established long connections&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>loadbalance&lt;/td>
&lt;td>loadbalance&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default loadbalance of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>load balancing strategy, optional values: &lt;br/>* random - random; &lt;br/>* roundrobin - round &lt;br/>* leastactive - least active call; &lt;br/>* consistenthash - consistent hash (version 2.1.0 and above); &lt;br/>* shortestresponse - shortest response (version 2.7.7 and above);&lt;/td>
&lt;td>2.0 .0+ version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>async&lt;/td>
&lt;td>async&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>async of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a> is used by default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>whether to execute asynchronously, unreliable and asynchronous, just ignore the return value and not block the execution thread&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>generic&lt;/td>
&lt;td>generic&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a> generic&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to default the generic interface, if it is a generic interface, it will return GenericService&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>check&lt;/td>
&lt;td>check&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default check of &lt;a href="dubbo:consumer">dubbo:consumer&lt;/a>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>check whether the provider exists at startup, true will report an error, false will ignore&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>url&lt;/td>
&lt;td>url&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>point-to-point direct connection service provider address, will bypass the registration center&lt;/td>
&lt;td>version 1.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>stub&lt;/td>
&lt;td>stub&lt;/td>
&lt;td>class/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The name of the service interface client&amp;rsquo;s local proxy class, which is used to execute local logic on the client, such as local cache, etc. The constructor of the local proxy class must allow input Remote proxy object, constructor such as: public XxxServiceLocal(XxxService xxxService)&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>mock&lt;/td>
&lt;td>mock&lt;/td>
&lt;td>class/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Service interface call failure Mock implementation class name, the Mock class must have a no-argument constructor, the difference from Local is that Local is always executed, while Mock Execute only When a non-business exception occurs (such as timeout, network exception, etc.), Local is executed before the remote call, and Mock is executed after the remote call.&lt;/td>
&lt;td>Supported by Dubbo1.0.13 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cache&lt;/td>
&lt;td>cache&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The call parameter is used as the key to cache the returned result, optional: lru, threadlocal, jcache, etc.&lt;/td>
&lt;td>Supported by Dubbo2.1.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>validation&lt;/td>
&lt;td>validation&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to enable JSR303 standard annotation validation, if enabled, the annotations on the method parameters will be validated&lt;/td>
&lt;td>Dubbo2.1.0 and above versions support&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proxy&lt;/td>
&lt;td>proxy&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>javassist&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>choose dynamic proxy implementation strategy, optional: javassist, jdk&lt;/td>
&lt;td>version above 2.0.2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client&lt;/td>
&lt;td>client&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>client transport type setting, such as netty or mina of Dubbo protocol.&lt;/td>
&lt;td>Supported by Dubbo2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registry&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>By default, the service list will be obtained from all registries and the results will be merged&lt;/td>
&lt;td>Configuration Association&lt;/td>
&lt;td>Register to obtain the service list from the specified registry, used when there are multiple registries, the value is &lt;a href="dubbo:registry">dubbo:registry&lt;/a> The id attribute, multiple registration center IDs are separated by commas&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>To call the person in charge of the service for service governance, please fill in the email prefix of the person in charge&lt;/td>
&lt;td>Version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>actives&lt;/td>
&lt;td>actives&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>maximum number of concurrent calls per service consumer per service per method&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cluster&lt;/td>
&lt;td>cluster&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>failover&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>cluster mode, optional: failover/failfast/failsafe/failback/forking/available/mergeable (2.1. )/zone-aware (version 2.7.5 or later)&lt;/td>
&lt;td>version 2.0 .5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>connections&lt;/td>
&lt;td>connections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>100&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of connections for each provider, short connection protocols such as rmi, http, and hessian indicate the limit on the number of connections, and long connection agreements such as dubbo indicate the established long connections Number&lt;/td>
&lt;td>Version 2.0.0 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>filter&lt;/td>
&lt;td>reference.filter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service consumer remote call process interceptor name, multiple names separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>listener&lt;/td>
&lt;td>invoker.listener&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>The service consumer quotes the name of the service listener, and multiple names are separated by commas&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>layer&lt;/td>
&lt;td>layer&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>the layer where the service caller resides. Such as: biz, dao, intl:web, china:acton.&lt;/td>
&lt;td>Version 2.0.7 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>init&lt;/td>
&lt;td>init&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether to starvely initialize the reference when afterPropertiesSet(), otherwise wait until someone injects or references the instance before initializing.&lt;/td>
&lt;td>Version 2.0.10 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>protocol&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>only call the service provider of the specified protocol, and ignore other protocols.&lt;/td>
&lt;td>Version 2.7.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client&lt;/td>
&lt;td>client&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to netty&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>protocol client implementation type, such as: dubbo protocol mina, netty, etc.&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>providerPort&lt;/td>
&lt;td>provider-port&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Mesh&lt;/td>
&lt;td>When dubbo.consumer.meshEnable=true, Dubbo will convert the request to K8S standard format by default, and combine VirtualService and DestinationRule for traffic management. At this time, the consumer can perceive to provider. If you don&amp;rsquo;t want to use VirtualService and DestinationRule, please set providerPort to make the consumer aware of the service port exposed by the provider&lt;/td>
&lt;td>Version 3.1.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>unloadClusterRelated&lt;/td>
&lt;td>unloadClusterRelated&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Mesh&lt;/td>
&lt;td>When dubbo.consumer.meshEnable=true, in Service Mesh mode, set it to true to unload the Directory, Router and Load Balance related to the Cluster in the current call , Delegate retry, load balancing, timeout and other traffic management functions to Sidecar, use VirtualService and DestinationRule for traffic management&lt;/td>
&lt;td>Version 3.1.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>None&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Reserved for extensions, any parameters can be extended and defined, and all extended parameters will be reflected in the URL configuration as they are&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>providedBy&lt;/td>
&lt;td>provided-by&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Mesh&lt;/td>
&lt;td>When dubbo.consumer.meshEnable=true, Dubbo will convert the request to K8S standard format by default, and combine VirtualService and DestinationRule for traffic management. At this time, the consumer can perceive to provider. The value should be consistent with the declared &lt;code>k8s service&lt;/code>&lt;/td>
&lt;td>Version 3.1.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>providerNamespace&lt;/td>
&lt;td>provider-namespace&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Mesh&lt;/td>
&lt;td>When dubbo.consumer.meshEnable=true, Dubbo will convert the request into K8S standard format by default, and combine VirtualService and DestinationRule for traffic management. At this time, the Consumer can perceive to provider. Please set the providerNamespace so that the consumer can address the provider dns according to this configuration, the default &lt;code>default&lt;/code>&lt;/td>
&lt;td>version 3.1.2 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="registry">registry&lt;/h3>
&lt;p>Registry configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.RegistryConfig&lt;/code>. At the same time, if there are multiple different registries, you can declare multiple &lt;code>&amp;lt;dubbo:registry&amp;gt;&lt;/code> tags, and specify the registry to use in the &lt;code>registry&lt;/code> attribute of &lt;code>&amp;lt;dubbo:service&amp;gt;&lt;/code> or &lt;code>&amp;lt;dubbo:reference&amp;gt;&lt;/code> .&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>id&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>the registration center references the BeanId, which can be referenced in &amp;lt;dubbo:service registry=&amp;quot;&amp;quot;&amp;gt; or &amp;lt;dubbo:reference registry=&amp;quot;&amp;quot;&amp;gt;&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>address&lt;/td>
&lt;td>&lt;a href="host:port">host:port&lt;/a>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service discovery&lt;/td>
&lt;td>The address of the registration center server. If the address has no port, the default is 9090. Multiple addresses in the same cluster are separated by commas. Such as: ip:port, ip:port, registry centers of different clusters, please configure multiple &lt;a href="dubbo:registry">dubbo:registry&lt;/a> tags&lt;/td>
&lt;td>Version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>&lt;protocol>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>registry address protocol, support &lt;code>dubbo&lt;/code>, &lt;code>multicast&lt;/code>, &lt;code>zookeeper&lt;/code>, &lt;code>redis&lt;/code>, &lt;code>consul(2.7. .2)&lt;/code>, &lt;code>etcd( 2.7.2)&lt;/code>, &lt;code>nacos(2.7.2)&lt;/code> and other protocols&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>port&lt;/td>
&lt;td>&lt;port>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>9090&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>the default port of the registry, when the address does not have a port, use this port as the default value&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>username&lt;/td>
&lt;td>&lt;username>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Username for logging in to the registration center, if the registration center does not require verification, it can be left blank&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>password&lt;/td>
&lt;td>&lt;password>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Password for logging in to the registration center, if the registration center does not require verification, you can leave it blank&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>transport&lt;/td>
&lt;td>registry.transporter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>netty&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>network transport mode, optional mina, netty&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>registry.timeout&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>5000&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>registry center request timeout (milliseconds)&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>session&lt;/td>
&lt;td>registry.session&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>60000&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Registry session timeout (milliseconds), used to detect dirty data after abnormal disconnection of the provider, such as the implementation of heartbeat detection, this time It is the heartbeat interval , which is different for different registration centers.&lt;/td>
&lt;td>Version 2.1.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>zone&lt;/td>
&lt;td>zone&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>the region to which the registry belongs, usually used for traffic isolation&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>file&lt;/td>
&lt;td>registry.file&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Use a file to cache the registry address list and service provider list. When the application is restarted, it will be restored based on this file. Note: two registries cannot use the same file storage&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>wait&lt;/td>
&lt;td>registry.wait&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>wait notification completion time (milliseconds) when stopping&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>check&lt;/td>
&lt;td>check&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to report an error when the registration center does not exist&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>register&lt;/td>
&lt;td>register&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether to register the service with this registry, if set to false, it will only subscribe and not register&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>subscribe&lt;/td>
&lt;td>subscribe&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to subscribe to this registry service, if set to false, it will only register, not subscribe&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dynamic&lt;/td>
&lt;td>dynamic&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service is dynamically registered, if it is set to false, it will be displayed as disabled after registration, it needs to be manually enabled, and when the service provider stops , it will not be automatically unregistered , need to be disabled manually.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>group&lt;/td>
&lt;td>group&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Service registration grouping, cross-group services will not affect each other, and cannot call each other, suitable for environment isolation.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service version&lt;/td>
&lt;td>version above 1.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>simplified&lt;/td>
&lt;td>simplified&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the URL registered to the registration center is in simplified mode (compatible with lower versions)&lt;/td>
&lt;td>version 2.7.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>extra-keys&lt;/td>
&lt;td>extraKeys&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>When simplified=true, extraKeys allows you to put extra keys in the URL besides the default parameters, in the format: &amp;ldquo;interface,key1,key2&amp;rdquo;.&lt;/td>
&lt;td>Version 2.7 .0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>useAsConfigCenter&lt;/td>
&lt;td>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the registry is used as a configuration center&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>useAsMetadataCenter&lt;/td>
&lt;td>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the registry is used as a metadata center&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accepts&lt;/td>
&lt;td>accepts&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The registry receives a list of rpc protocols, multiple protocols are separated by commas, such as dubbo, rest&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>preferred&lt;/td>
&lt;td>preferred&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to be the preferred registry. When subscribing to multiple registries, if set to true, the registries will be preferred&lt;/td>
&lt;td>Version 2.7.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>weight&lt;/td>
&lt;td>weight&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>registration traffic weight. When using multiple registries, you can use this value to adjust the distribution of registration traffic. This value does not take effect when setting the preferred registry&lt;/td>
&lt;td>Version 2.7. 5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registerMode&lt;/td>
&lt;td>register-mode&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>all&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Control address registration behavior, used for application-level service discovery and migration. &lt;br/>* instance only registers application-level addresses;&lt;br/>* interface only registers interface-level addresses;&lt;br/>* all (default) registers both application-level and interface-level addresses;&lt;/td>
&lt;td>Version 3.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>enableEmptyProtection&lt;/td>
&lt;td>enable-empty-protection&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether to enable the protection of the empty address list on the consumer side globally. After enabling it, the empty address push from the registration center will be ignored. The default is true&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>None&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Reserved for extensions, any parameters can be extended and defined, and all extended parameters will be reflected in the URL configuration as they are&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="config-center">config-center&lt;/h3>
&lt;p>configuration center. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ConfigCenterConfig&lt;/code>&lt;/p>
&lt;p>| Attribute | Corresponding URL parameter | Type | Required | Default | Description | Compatibility |
| &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- | &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- | &amp;mdash;&amp;mdash;&amp;mdash; &amp;mdash;&amp;mdash;&amp;mdash;- | &amp;mdash;&amp;mdash;&amp;ndash; | &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- | &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;ndash; | &amp;ndash; &amp;mdash;- |
| protocol | protocol | string | optional | zookeeper | Which configuration center to use: apollo, zookeeper, nacos, etc. &lt;br />Take zookeeper as an example&lt;br />1. If the protocol is specified, the address can be simplified to &lt;code>127.0.0.1:2181&lt;/code>;&lt;br />2. If the protocol is not specified, the address value will be &lt;code>zookeeper:// 127.0.0.1:2181&lt;/code> | Version 2.7.0 or higher |
| address | address | string | Mandatory | | Configuration center address. &lt;br />See the protocol description for the value | Version 2.7.0 and above |
| highestPriority | highest-priority| boolean | optional | true | The configuration item from the configuration center has the highest priority, that is, the local configuration item will be overwritten. | Version 2.7.0 and above |
| namespace | namespace | string | optional | dubbo | Usually used for multi-tenant isolation, the actual meaning depends on the specific configuration center. &lt;br />Such as: &lt;br />zookeeper - environment isolation, the default value is &lt;code> dubbo&lt;/code>; &lt;br />apollo - distinguishes configuration sets in different domains, using &lt;code>dubbo&lt;/code> and &lt;code>application&lt;/code> by default | Version 2.7.0 and above |
| cluster | cluster | string | optional | | The meaning depends on the selected configuration center. &lt;br />It is used to distinguish different configuration clusters in Apollo | Version 2.7.0 and above |
group | group | string | optional | dubbo | The meaning depends on the selected configuration center. &lt;br />nacos - isolate different configuration sets&lt;br />zookeeper - isolate different configuration sets | Version 2.7.0 and above |
| check | check | boolean | optional | true | Whether to terminate the application startup when the connection to the configuration center fails. | Version 2.7.0 and above |
| configFile | config-file | string | optional | dubbo.properties | the key to which the global configuration file is mapped&lt;br />zookeeper - default path /dubbo/config/dubbo/dubbo.properties&lt;br />apollo - dubbo dubbo.properties key in namespace | Version 2.7.0 or later |
| appConfigFile | app-config-file | string | optional | | &amp;ldquo;configFile&amp;rdquo; is shared globally. This item is restricted to properties configured by this application | 2.7.0+ |
| timeout | timeout | int | optional | 3000ms | get the configured timeout | version 2.7.0 or later |
| username | username | string | optional | | If the configuration center needs to be verified, the username&lt;br />Apollo is not enabled yet | Version 2.7.0 or later |
| password | password | string | Optional | | If the configuration center needs to be verified, the password&lt;br />Apollo is not enabled yet | Version 2.7.0 or later |
| parameters | parameters | Map&amp;lt;string, string&amp;gt; | Optional | | Extended parameters, used to support customized configuration parameters of different configuration centers | Version 2.7.0 or later |
| includeSpringEnv |include-spring-env| boolean | Optional | false | Supported when using the Spring framework. When true, the configuration will be automatically read from the Spring Environment. &lt;br />By default, &lt;br />key is dubbo .properties configuration &lt;br />key is Dubbo.properties PropertySource | Version 2.7.0 or above |&lt;/p>
&lt;h3 id="metadata-report-config">metadata-report-config&lt;/h3>
&lt;p>metadata center. Corresponding configuration class: &lt;code>org.apache.dubbo.config.MetadataReportConfig&lt;/code>&lt;/p>
&lt;p>| Attribute | Corresponding URL parameter | Type | Required | Default | Description | Compatibility |
| &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; | &amp;mdash;&amp;mdash;&amp;mdash; | &amp;mdash;&amp;mdash; | &amp;mdash;&amp;mdash;&amp;ndash; | &amp;mdash;&amp;mdash;- &amp;ndash; | &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;ndash; &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;- | &amp;mdash;&amp;mdash; |
| address | address | string | required | | metadata center address. | Version 2.7.0 and above |
protocol | protocol | string | optional | zookeeper | metadata center protocol: zookeeper, nacos, redis, etc. &lt;br />Take zookeeper as an example&lt;br />1. If the protocol is specified, the address can be simplified to &lt;code>127.0.0.1:2181&lt;/code>;&lt;br />2. If the protocol is not specified, the address value will be &lt;code>zookeeper:// 127.0.0.1:2181&lt;/code> | Version 2.7.13 and above |
| port | port | int | optional | | metadata center port number. Specify the port, then the address can be simplified, no need to configure the port number | Version 2.7.13 or later |
| username | username | string | optional | | metadata center needs to be verified, username&lt;br />Apollo is not enabled yet | version 2.7.0 or later |
| password | password | string | Optional | | The metadata center needs to be verified, and the password&lt;br />Apollo is not enabled yet | Version 2.7.0 or later |
| timeout | timeout | int | optional | | get metadata timeout (ms) | version 2.7.0 or later |
| group | group | string | optional | dubbo | Metadata grouping, suitable for environment isolation. It has the same meaning as the registration center group | Version 2.7.0 and above |
| retryTimes | retry-times | int | optional | 100 | number of retries | version 2.7.0 or later |
| retryPeriod | retry-period | int | optional | 3000ms | retry interval (ms) | version 2.7.0 or later |
| cycleReport | cycle-report | boolean| optional | true | Whether to update full metadata every day | Version 2.7.0 and above |
| syncReport | sync-report | boolean| optional | false | whether to update metadata synchronously, the default is asynchronous | version 2.7.0 or later |
| cluster | cluster | string | optional | | The meaning depends on the selected metadata center. &lt;br />It is used to distinguish different configuration clusters in Apollo | Version 2.7.0 and above |
| file | file | string | optional | | use the file cache metadata center list, when the application is restarted, it will be restored based on this file, note: two metadata centers cannot use the same file storage | version 2.7.0 or later |
| check | check | boolean | optional | true | Whether to terminate the application startup when the metadata center connection fails. | Version 3.0.0 and above |
| reportMetadata | report-metadata | boolean | Optional | false | Whether to upload the interface configuration report metadata in the address discovery, &lt;code>dubbo.application.metadata-type=remote&lt;/code> If the configuration does not work, it will be reported, &lt;code>dubbo. Whether to report when application.metadata-type=local&lt;/code> is determined by the configuration value | Version 3.0.0 or later |
| reportDefinition | report-definition | boolean | Optional | true | Whether to report metadata for service operation and maintenance | Version 3.0.0 or later |
| reportConsumerDefinition | report-consumer-definition | boolean | Optional | true | Whether to report metadata for service operation and maintenance on the consumer side | Version 3.0.0 or later |
| parameters | parameters | Map&amp;lt;string, string&amp;gt; | Optional | | Extended parameters, used to support customized configuration parameters of different metadata centers | Version 2.7.0 or later |&lt;/p>
&lt;h3 id="protocol">protocol&lt;/h3>
&lt;p>Service provider protocol configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ProtocolConfig&lt;/code>. At the same time, if you need to support multiple protocols, you can declare multiple &lt;code>&amp;lt;dubbo:protocol&amp;gt;&lt;/code> tags, and specify the used protocol through the &lt;code>protocol&lt;/code> attribute in &lt;code>&amp;lt;dubbo:service&amp;gt;&lt;/code>.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>id&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>protocol BeanId, you can refer to this ID in &amp;lt;dubbo:service protocol=&amp;quot;&amp;quot;&amp;gt;, if the ID is not filled, the default is the same as the value of the name attribute, and if it is repeated, it will be in the name followed by the serial number.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>name&lt;/td>
&lt;td>&lt;protocol>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Protocol name&lt;/td>
&lt;td>Version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>port&lt;/td>
&lt;td>&lt;port>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>The default port of dubbo protocol is 20880, the default port of rmi protocol is 1099, the default port of http and hessian protocol is 80; if &lt;b>no&lt;/b> port is configured, The default port will be used automatically, if configured as &lt;b>-1&lt;/b>, an unoccupied port will be allocated. For Dubbo 2.4.0+, the allocated port is increased on the basis of the default port of the protocol to ensure that the port segment is controllable.&lt;/td>
&lt;td>Service Discovery&lt;/td>
&lt;td>Service Port&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>host&lt;/td>
&lt;td>&lt;host>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Automatically find local IP&lt;/td>
&lt;td>Service discovery&lt;/td>
&lt;td>- Service host name, used when selecting multiple network cards or specifying VIP and domain name, if it is empty, it will automatically find local IP, - it is recommended not to configure , let Dubbo automatically obtain the local IP&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threadpool&lt;/td>
&lt;td>threadpool&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>fixed&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool type, optional: fixed/cached/limit (above 2.5.3)/eager (above 2.6.x)&lt;/td>
&lt;td>version 2.0.5 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threadname&lt;/td>
&lt;td>threadname&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool name&lt;/td>
&lt;td>version 2.7.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threads&lt;/td>
&lt;td>threads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>200&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service thread pool size (fixed size)&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>corethreads&lt;/td>
&lt;td>corethreads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>200&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool core thread size&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>iothreads&lt;/td>
&lt;td>threads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>number of cpus + 1&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>io thread pool size (fixed size)&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accepts&lt;/td>
&lt;td>accepts&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>payload&lt;/td>
&lt;td>payload&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>8388608(=8M)&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>request and response packet size limit, unit: byte&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>codec&lt;/td>
&lt;td>codec&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol encoding&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>serialization&lt;/td>
&lt;td>serialization&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to hessian2, rmi protocol defaults to java, http protocol defaults to json&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol serialization method, used when the protocol supports multiple serialization methods , such as: dubbo, hessian2, java, compactedjava of dubbo protocol, and json of http protocol, etc.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accesslog&lt;/td>
&lt;td>accesslog&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Set to true, the access log will be output to the logger, you can also fill in the access log file path, directly output the access log to the specified file&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>path&lt;/td>
&lt;td>&lt;path>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>provider context path, prefix of service path&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>transporter&lt;/td>
&lt;td>transporter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to netty&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol server and client implementation types, such as: dubbo protocol mina, netty, etc., can be split into server and client configuration&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>server&lt;/td>
&lt;td>server&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Dubbo protocol defaults to netty, http protocol defaults to servlet&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The server-side implementation type of the protocol, such as: mina, netty of dubbo protocol, etc., jetty of http protocol, servlet, etc.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client&lt;/td>
&lt;td>client&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Dubbo protocol defaults to netty&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Protocol client implementation type, such as: dubbo protocol mina, netty, etc.&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dispatcher&lt;/td>
&lt;td>dispatcher&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to all&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol message distribution method, used to specify the thread model, such as: all, direct, message, execution, connection, etc. of dubbo protocol&lt;/td>
&lt;td>2.1 .0+ version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>queues&lt;/td>
&lt;td>queues&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool queue size, when the thread pool is full, the size of the queue waiting to be executed, it is recommended not to set, when the thread pool is full, it should fail immediately, and retry other Serving provisioning machines, rather than queuing, unless there is a special need.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>charset&lt;/td>
&lt;td>charset&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>UTF-8&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>serialization encoding&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>buffer&lt;/td>
&lt;td>buffer&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>8192&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>network read and write buffer size&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>heartbeat&lt;/td>
&lt;td>heartbeat&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>Performance Tuning&lt;/td>
&lt;td>A heartbeat is required to help check if a connection is broken&lt;/td>
&lt;td>2.0.10+&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>telnet&lt;/td>
&lt;td>telnet&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Supported telnet commands, separated by commas&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>register&lt;/td>
&lt;td>register&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the service of this protocol is registered to the registry&lt;/td>
&lt;td>version 2.0.8 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>contextpath&lt;/td>
&lt;td>contextpath&lt;/td>
&lt;td>String&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default is empty string&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>context path&lt;/td>
&lt;td>version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>sslEnabled&lt;/td>
&lt;td>ssl-enabled&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to enable ssl&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>parameters&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>extended parameters&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="provider">provider&lt;/h3>
&lt;p>Service provider default configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ProviderConfig&lt;/code>. At the same time, this tag is the default value setting of &lt;code>&amp;lt;dubbo:service&amp;gt;&lt;/code> and &lt;code>&amp;lt;dubbo:protocol&amp;gt;&lt;/code> tags.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>id&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>protocol BeanId, you can refer to this ID in &amp;lt;dubbo:service proivder=&amp;quot;&amp;quot;&amp;gt;&lt;/td>
&lt;td>version above 1.0.16&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>&lt;protocol>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol name&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>host&lt;/td>
&lt;td>&lt;host>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Automatically search for local IP&lt;/td>
&lt;td>Service discovery&lt;/td>
&lt;td>Service host name, used when selecting multiple network cards or specifying VIP and domain name, if it is empty, it will automatically search for local IP. Dubbo automatically obtains the local IP&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threads&lt;/td>
&lt;td>threads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>200&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service thread pool size (fixed size)&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>payload&lt;/td>
&lt;td>payload&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>8388608(=8M)&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>request and response packet size limit, unit: byte&lt;/td>
&lt;td>version above 2.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>path&lt;/td>
&lt;td>&lt;path>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>provider context path, prefix of service path&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>transporter&lt;/td>
&lt;td>transporter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to netty&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol server and client implementation types, such as: dubbo protocol mina, netty, etc., can be split into server and client configuration&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>server&lt;/td>
&lt;td>server&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Dubbo protocol defaults to netty, http protocol defaults to servlet&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The server-side implementation type of the protocol, such as: mina, netty of dubbo protocol, etc., jetty of http protocol, servlet, etc.&lt;/td>
&lt;td>Version 2.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client&lt;/td>
&lt;td>client&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Dubbo protocol defaults to netty&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Protocol client implementation type, such as: dubbo protocol mina, netty, etc.&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dispatcher&lt;/td>
&lt;td>dispatcher&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to all&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol message distribution method, used to specify the thread model, such as: all, direct, message, execution, connection, etc. of dubbo protocol&lt;/td>
&lt;td>2.1 .0+ version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>codec&lt;/td>
&lt;td>codec&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol encoding&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>serialization&lt;/td>
&lt;td>serialization&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo protocol defaults to hessian2, rmi protocol defaults to java, http protocol defaults to json&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol serialization method, used when the protocol supports multiple serialization methods , such as: dubbo, hessian2, java, compactedjava of the dubbo protocol, and json, xml of the http protocol&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>default&lt;/td>
&lt;td>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>whether it is the default protocol, used for multi-protocol&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>filter&lt;/td>
&lt;td>service.filter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service provider remote call process interceptor name, multiple names separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>listener&lt;/td>
&lt;td>exporter.listener&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service provider export service listener name, multiple names separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threadpool&lt;/td>
&lt;td>threadpool&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>fixed&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool type, optional: fixed/cached/limit (above 2.5.3)/eager (above 2.6.x)&lt;/td>
&lt;td>version 2.0.5 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threadname&lt;/td>
&lt;td>threadname&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool name&lt;/td>
&lt;td>version 2.7.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accepts&lt;/td>
&lt;td>accepts&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0.0.0&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service version, it is recommended to use a two-digit version, such as: 1.0, usually the version number needs to be upgraded when the interface is incompatible&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>group&lt;/td>
&lt;td>group&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service discovery&lt;/td>
&lt;td>service grouping, when an interface has multiple implementations, they can be distinguished by grouping&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>delay&lt;/td>
&lt;td>delay&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Delayed registration service time (milliseconds) - When set to -1, it means that the service is delayed until the initialization of the Spring container is completed&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>default.timeout&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>1000&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>remote service call timeout (milliseconds)&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>retries&lt;/td>
&lt;td>default.retries&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>2&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The number of remote service call retries, excluding the first call, please set it to 0 if you don&amp;rsquo;t need to retry&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>connections&lt;/td>
&lt;td>default.connections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of connections for each provider, short connection protocols such as rmi, http, and hessian indicate the limit on the number of connections, long connection agreements such as dubbo indicate the established The number of long connections&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>loadbalance&lt;/td>
&lt;td>default.loadbalance&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>random&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>load balancing strategy, optional values:&lt;br/>* random - random; &lt;br/>* roundrobin - round robin; leastactive - least active call; &lt;br/>* consistenthash - consistent hash (2.1.0+); &lt;br/>* shortestresponse - shortest response (2.7.7+);&lt;/td>
&lt;td>2.0.5+&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>async&lt;/td>
&lt;td>default.async&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>whether to execute asynchronously by default, unreliable and asynchronous, just ignore the return value and not block the execution thread&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>stub&lt;/td>
&lt;td>stub&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>If set to true, it means to use the default proxy class name, namely: interface name + Local suffix.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>mock&lt;/td>
&lt;td>mock&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Set to true to use the default Mock class name, namely: interface name + Mock suffix.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>token&lt;/td>
&lt;td>token&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Token verification, empty means not enabled, if true, means randomly generated dynamic tokens&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registry&lt;/td>
&lt;td>registry&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>register with all registries by default&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>register with the specified registry, used when there are multiple registries, the value is the id attribute of &lt;a href="dubbo:registry">dubbo:registry&lt;/a>, multiple registry IDs Separated by commas, if you do not want to register the service to any registry, you can set the value to N/A&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dynamic&lt;/td>
&lt;td>dynamic&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service is dynamically registered, if it is set to false, the disabled status will be displayed after registration, and it needs to be manually enabled, and the registration will not be canceled automatically when the service provider stops , need to be disabled manually.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>accesslog&lt;/td>
&lt;td>accesslog&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service management&lt;/td>
&lt;td>set to true, the access log will be output to the logger, and the access log file path can also be filled in to output the access log directly to the specified file&lt;/td>
&lt;td>2.0.5 and above version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>document&lt;/td>
&lt;td>document&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>service document URL&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>weight&lt;/td>
&lt;td>weight&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service weight&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>executes&lt;/td>
&lt;td>executes&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of parallel execution requests per service and method of a service provider&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>actives&lt;/td>
&lt;td>default.actives&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>maximum number of concurrent calls per service consumer per service per method&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proxy&lt;/td>
&lt;td>proxy&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>javassist&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>generate dynamic proxy, optional: jdk/javassist&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cluster&lt;/td>
&lt;td>default.cluster&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>failover&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>cluster mode, optional: failover/failfast/failsafe/failback/forking&lt;/td>
&lt;td>version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>deprecated&lt;/td>
&lt;td>deprecated&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service is deprecated, if set to true, the consumer will print the service deprecated warning error log&lt;/td>
&lt;td>2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>queues&lt;/td>
&lt;td>queues&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool queue size, when the thread pool is full, the size of the queue waiting to be executed, it is recommended not to set, when the thread pool is full, it should fail immediately, and retry other Serving provisioning machines, rather than queuing, unless there is a special need.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>charset&lt;/td>
&lt;td>charset&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>UTF-8&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>serialization encoding&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>buffer&lt;/td>
&lt;td>buffer&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>8192&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>network read and write buffer size&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>iothreads&lt;/td>
&lt;td>iothreads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>CPU + 1&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>IO thread pool, receive network read and write interrupts, serialize and deserialize, do not process business, business thread pool see threads configuration, this thread pool It is related to the CPU and is not recommended to be configured.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>alive&lt;/td>
&lt;td>alive&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service management&lt;/td>
&lt;td>thread pool keepAliveTime, the default unit is ms&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>telnet&lt;/td>
&lt;td>telnet&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Supported telnet commands, separated by commas&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>wait&lt;/td>
&lt;td>wait&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Waiting time when stopping the service&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>contextpath&lt;/td>
&lt;td>contextpath&lt;/td>
&lt;td>String&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default is empty string&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>context path&lt;/td>
&lt;td>version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>layer&lt;/td>
&lt;td>layer&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>the layer where the service provider resides. Such as: biz, dao, intl:web, china:acton.&lt;/td>
&lt;td>Version 2.0.7 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>parameters&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>extended parameters&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="consumer">consumer&lt;/h3>
&lt;p>Service consumer default configuration. Configuration class: &lt;code>org.apache.dubbo.config.ConsumerConfig&lt;/code>. At the same time, this tag is the default value setting of the &lt;code>&amp;lt;dubbo:reference&amp;gt;&lt;/code> tag.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>default.timeout&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>1000&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>remote service call timeout (milliseconds)&lt;/td>
&lt;td>version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>retries&lt;/td>
&lt;td>default.retries&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>2&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The number of remote service call retries, excluding the first call, please set it to 0 if you do not need to retry, it is only valid when the cluster is failback/failover&lt;/td>
&lt;td>Version 1.0.16 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>loadbalance&lt;/td>
&lt;td>default.loadbalance&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>random&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>load balancing strategy, optional values:&lt;br/>* random - random; &lt;br/>* roundrobin - round robin; leastactive - least active call; &lt;br/>* consistenthash - consistent hash (2.1.0+); &lt;br/>* shortestresponse - shortest response (2.7.7+);&lt;/td>
&lt;td>1.0.16+&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>async&lt;/td>
&lt;td>default.async&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>whether to execute asynchronously by default, unreliable and asynchronous, just ignore the return value and not block the execution thread&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>sent&lt;/td>
&lt;td>default.sent&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>when calling asynchronously, when the flag sent=true, it means that the network has sent data&lt;/td>
&lt;td>version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>connections&lt;/td>
&lt;td>default.connections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>100&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of connections for each service to each provider, rmi, http, hessian and other short connection protocols support this configuration, dubbo protocol long connection does not support This configuration&lt;/td>
&lt;td>1.0.16+ version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>generic&lt;/td>
&lt;td>generic&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to default the generic interface, if it is a generic interface, it will return GenericService&lt;/td>
&lt;td>version above 2.0.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>check&lt;/td>
&lt;td>check&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Check whether the provider exists at startup, true reports an error, false ignores&lt;/td>
&lt;td>version 1.0.16 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>proxy&lt;/td>
&lt;td>proxy&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>javassist&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>generate dynamic proxy, optional: jdk/javassist&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>To call the person in charge of the service for service governance, please fill in the email prefix of the person in charge&lt;/td>
&lt;td>Version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>actives&lt;/td>
&lt;td>default.actives&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>maximum number of concurrent calls per service consumer per service per method&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cluster&lt;/td>
&lt;td>default.cluster&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>failover&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>cluster mode, optional: failover/failfast/failsafe/failback/forking/available/mergeable (2.1. above)/zone-aware(2.7.5 above)&lt;/td>
&lt;td>2.0.5 above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>filter&lt;/td>
&lt;td>reference.filter&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service consumer remote call process interceptor name, multiple names separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>listener&lt;/td>
&lt;td>invoker.listener&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the service consumer quotes the name of the service listener, multiple names are separated by commas&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>registry&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default registration to all registries&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>registration to the specified registry, used in multiple registries, the value is the id attribute of &lt;a href="dubbo:registry">dubbo:registry&lt;/a>, used for multiple registries IDs Separated by commas, if you do not want to register the service to any registry, you can set the value to N/A&lt;/td>
&lt;td>Version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>layer&lt;/td>
&lt;td>layer&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>the layer where the service caller resides. Such as: biz, dao, intl:web, china:acton.&lt;/td>
&lt;td>Version 2.0.7 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>init&lt;/td>
&lt;td>init&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether to starvely initialize the reference when afterPropertiesSet(), otherwise wait until someone injects or references the instance before initializing.&lt;/td>
&lt;td>Version 2.0.10 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cache&lt;/td>
&lt;td>cache&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The call parameter is used as the key to cache the returned result, optional: lru, threadlocal, jcache, etc.&lt;/td>
&lt;td>Supported by version 2.1.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>validation&lt;/td>
&lt;td>validation&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether to enable JSR303 standard annotation validation, if enabled, the annotations on the method parameters will be validated&lt;/td>
&lt;td>2.1.0 and above version support&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>configure multiple versions for the same service in Dubbo&lt;/td>
&lt;td>2.2.0 and above versions support&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>client&lt;/td>
&lt;td>client&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>Dubbo protocol defaults to netty&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Protocol client implementation type, such as: dubbo protocol mina, netty, etc.&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threadpool&lt;/td>
&lt;td>threadpool&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>fixed&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool type, optional: fixed/cached/limit (above 2.5.3)/eager (above 2.6.x)&lt;/td>
&lt;td>version 2.0.5 or above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>corethreads&lt;/td>
&lt;td>corethreads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>200&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool core thread size&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>threads&lt;/td>
&lt;td>threads&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>200&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>service thread pool size (fixed size)&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>queues&lt;/td>
&lt;td>queues&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool queue size, when the thread pool is full, the size of the queue waiting to be executed, it is recommended not to set, when the thread pool is full, it should fail immediately, and retry other Serving provisioning machines, rather than queuing, unless there is a special need.&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>shareconnections&lt;/td>
&lt;td>shareconnections&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>1&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>number of shared connections. When the connection parameter is set to 0, the shared mode connection will be enabled, and there is only one connection by default. Only supports dubbo protocol&lt;/td>
&lt;td>version 2.7.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>referThreadNum&lt;/td>
&lt;td>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance optimization&lt;/td>
&lt;td>thread pool size for asynchronous calls&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>meshEnable&lt;/td>
&lt;td>mesh-enable&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Mesh&lt;/td>
&lt;td>Dubbo Mesh mode switch. After it is turned on, it can adapt to the SideCar mode and convert Dubbo service calls to K8S standard calls. Only supports the Triple protocol and is compatible with GRPC. After setting to true, the native docking K8S, no third-party registration center is required, just set dubbo.registry.address=N/A&lt;/td>
&lt;td>Version 3.1.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>parameters&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>extended parameters&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="metrics">metrics&lt;/h3>
&lt;p>Indicator configuration. Configuration class: &lt;code>org.apache.dubbo.config.MetricsConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>protocol&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>prometheus&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>protocol name, prometheus is used by default&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>prometheus&lt;/td>
&lt;td>&lt;/td>
&lt;td>PrometheusConfig&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>configuration association&lt;/td>
&lt;td>prometheus related configuration&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>aggregation&lt;/td>
&lt;td>&lt;/td>
&lt;td>AggregationConfig&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Configuration association&lt;/td>
&lt;td>Indicator aggregation related configuration&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;ul>
&lt;li>PrometheusConfig corresponding class: &lt;code>org.apache.dubbo.config.nested.PrometheusConfig&lt;/code>&lt;/li>
&lt;/ul>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>exporter.enabled&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>whether to enable prometheus exporter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exporter.enableHttpServiceDiscovery&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>whether to enable http service discovery&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exporter.httpServiceDiscoveryUrl&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>http service discovery URL&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exporter.metricsPort&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>port number to expose when using the pull method&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exporter.metricsPath&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>path to expose metrics when using pull method&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pushgateway.enabled&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>whether to publish metrics through the Pushgateway of prometheus&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pushgateway.baseUrl&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Pushgateway address&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pushgateway.username&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Pushgateway username&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pushgateway.password&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Pushgateway password&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pushgateway.pushInterval&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>push indicator interval time&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;ul>
&lt;li>AggregationConfig corresponding class: &lt;code>org.apache.dubbo.config.nested.AggregationConfig&lt;/code>&lt;/li>
&lt;/ul>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>enabled&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Whether to enable the local indicator aggregation function&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>bucketNum&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>the number of time window buckets&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeWindowSeconds&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>time window duration (s)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="ssl">ssl&lt;/h3>
&lt;p>TLS authentication configuration. Configuration class: &lt;code>org.apache.dubbo.config.SslConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>serverKeyCertChainPath&lt;/td>
&lt;td>server-key-cert-chain-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>serverPrivateKeyPath&lt;/td>
&lt;td>server-private-key-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>server private key path&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>serverKeyPassword&lt;/td>
&lt;td>server-key-password&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>server key password&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>serverTrustCertCollectionPath&lt;/td>
&lt;td>server-trust-cert-collection-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>server trust certificate path&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>clientKeyCertChainPath&lt;/td>
&lt;td>client-key-cert-chain-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>client signature certificate path&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>clientPrivateKeyPath&lt;/td>
&lt;td>client-private-key-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>client private key path&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>clientKeyPassword&lt;/td>
&lt;td>client-key-password&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>client key password&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>clientTrustCertCollectionPath&lt;/td>
&lt;td>client-trust-cert-collection-path&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>security configuration&lt;/td>
&lt;td>client trust certificate path&lt;/td>
&lt;td>version 2.7.5 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="module">module&lt;/h3>
&lt;p>Module information configuration. The corresponding configuration class &lt;code>org.apache.dubbo.config.ModuleConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>name&lt;/td>
&lt;td>module&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Current module name, used by the registry to calculate dependencies between modules&lt;/td>
&lt;td>Version 2.2.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>module.version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>current module version&lt;/td>
&lt;td>version 2.2.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>owner&lt;/td>
&lt;td>module.owner&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>The person in charge of the module, used for service governance, please fill in the email prefix of the person in charge&lt;/td>
&lt;td>Version above 2.2.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>organization&lt;/td>
&lt;td>module.organization&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Organization name (BU or department), which is used by the registration center to distinguish service sources. It is recommended not to use autoconfig for this configuration item, and write it directly in the configuration, such as China, intl, itu, crm, asc, dw, aliexpress, etc.&lt;/td>
&lt;td>Version 2.2.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>background&lt;/td>
&lt;td>background&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>whether to enable the background startup mode. If enabled, there is no need to wait for the spring ContextRefreshedEvent event to complete&lt;/td>
&lt;td>Version 3.0.0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>referAsync&lt;/td>
&lt;td>referAsync&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether to enable asynchronous calls on the consumer side&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>referThreadNum&lt;/td>
&lt;td>referThreadNum&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>thread pool size for asynchronous calls&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exportAsync&lt;/td>
&lt;td>exportAsync&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether export is enabled on the server&lt;/td>
&lt;td>Version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>exportThreadNum&lt;/td>
&lt;td>exportThreadNum&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>asynchronous export thread pool size&lt;/td>
&lt;td>&lt;/td>
&lt;td>version 3.0.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="monitor">monitor&lt;/h3>
&lt;p>Monitoring center configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.MonitorConfig&lt;/code>&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>protocol&lt;/td>
&lt;td>protocol&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>dubbo&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>monitoring center protocol, if it is protocol=&amp;ldquo;registry&amp;rdquo;, it means that the address of the monitoring center is found from the registry, otherwise it is directly connected to the monitoring center.&lt;/td>
&lt;td>Version 2.0.9 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>address&lt;/td>
&lt;td>&lt;url>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Directly connected to the monitoring center server address, address=&amp;ldquo;10.20.130.230:12080&amp;rdquo;&lt;/td>
&lt;td>Version 1.0.16 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>username&lt;/td>
&lt;td>username&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>monitoring center username&lt;/td>
&lt;td>version 2.0.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>password&lt;/td>
&lt;td>password&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>monitoring center password&lt;/td>
&lt;td>version 2.0.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>group&lt;/td>
&lt;td>group&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>grouping&lt;/td>
&lt;td>version 2.0.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>version&lt;/td>
&lt;td>version&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>version number&lt;/td>
&lt;td>version 2.0.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>interval&lt;/td>
&lt;td>interval&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>interval time&lt;/td>
&lt;td>version 2.0.9 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>parameters&lt;/td>
&lt;td>parameters&lt;/td>
&lt;td>Map&amp;lt;string, string&amp;gt;&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>custom parameters&lt;/td>
&lt;td>version 2.0.0 or later&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="method">method&lt;/h3>
&lt;p>Method-level configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.MethodConfig&lt;/code>. At the same time, this tag is a sub-tag of &lt;code>service&lt;/code> or &lt;code>reference&lt;/code>, which is used to control to the method level.&lt;/p>
&lt;p>for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:reference&lt;/span> interface=&lt;span style="color:#2aa198">&amp;#34;com.xxx.XxxService&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:method&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;findXxx&amp;#34;&lt;/span> timeout=&lt;span style="color:#2aa198">&amp;#34;3000&amp;#34;&lt;/span> retries=&lt;span style="color:#2aa198">&amp;#34;2&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/dubbo:reference&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>name&lt;/td>
&lt;td>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>logo&lt;/td>
&lt;td>method name&lt;/td>
&lt;td>version 1.0.8 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>timeout&lt;/td>
&lt;td>&lt;methodName>.timeout&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default is timeout&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>method call timeout (milliseconds)&lt;/td>
&lt;td>version 1.0.8 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>retries&lt;/td>
&lt;td>&lt;methodName>.retries&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>The default is retries of &lt;a href="dubbo:reference">dubbo:reference&lt;/a>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>The number of retries for remote service calls, excluding the first call, please set it to 0&lt;/td>
&lt;td>Version 2.0.0 or higher&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>loadbalance&lt;/td>
&lt;td>&lt;methodName>.loadbalance&lt;/td>
&lt;td>string&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>default is loadbalance&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>load balancing strategy, optional values: &lt;br/>* random - random; &lt;br/>* roundrobin - polling ; &lt;br/>* leastactive - least active call; &lt;br/>* consistenthash - consistent hash (version 2.1.0+); &lt;br/>* shortestresponse - shortest response (version 2.7.7+);&lt;/td>
&lt;td>2.0. Version 0 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>async&lt;/td>
&lt;td>&lt;methodName>.async&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>The default is async of &lt;a href="dubbo:reference">dubbo:reference&lt;/a>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether to execute asynchronously, unreliable and asynchronous, just ignore the return value and not block the execution thread&lt;/td>
&lt;td>1.0.9 above version&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>sent&lt;/td>
&lt;td>&lt;methodName>.sent&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>When calling asynchronously, when the mark sent=true, it means that the network has sent data&lt;/td>
&lt;td>Version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>actives&lt;/td>
&lt;td>&lt;methodName>.actives&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>maximum concurrent call limit for each service consumer&lt;/td>
&lt;td>version 2.0.5 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>executes&lt;/td>
&lt;td>&lt;methodName>.executes&lt;/td>
&lt;td>int&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>0&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>the maximum number of threads used per service and method - -, this attribute is only used when &lt;a href="dubbo:method">dubbo:method&lt;/a> is used as a subtag of &lt;a href="dubbo:service">dubbo:service&lt;/a> Valid&lt;/td>
&lt;td>Version 2.0.5 and above&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>deprecated&lt;/td>
&lt;td>&lt;methodName>.deprecated&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether the service method is deprecated, this attribute is only valid when &lt;a href="dubbo:method">dubbo:method&lt;/a> is used as a subtag of &lt;a href="dubbo:service">dubbo:service&lt;/a>&lt;/td>
&lt;td>Version above 2.0.5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>sticky&lt;/td>
&lt;td>&lt;methodName>.sticky&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>false&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>set true All methods on this interface use the same provider. If you need more complex rules, please use routing&lt;/td>
&lt;td>2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>return&lt;/td>
&lt;td>&lt;methodName>.return&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>true&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Whether the method call needs to return a value. It will take effect only when async is set to true. If it is set to true, it will return future, or call back methods such as onreturn. If set to false, Null will be returned directly after the request is sent successfully&lt;/td>
&lt;td>Versions above 2.0.6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>oninvoke&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Intercept before instance execution&lt;/td>
&lt;td>Version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>onreturn&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Intercept after instance execution returns&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>onthrow&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>performance tuning&lt;/td>
&lt;td>exception interception in instance execution&lt;/td>
&lt;td>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>oninvokeMethod&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Intercept before method execution&lt;/td>
&lt;td>Version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>onreturnMethod&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Intercept after method execution returns&lt;/td>
&lt;td>Version above 2.0.6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>onthrowMethod&lt;/td>
&lt;td>attribute attribute, not reflected in the URL&lt;/td>
&lt;td>String&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Performance tuning&lt;/td>
&lt;td>Method execution has exception interception&lt;/td>
&lt;td>Version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>cache&lt;/td>
&lt;td>&lt;methodName>.cache&lt;/td>
&lt;td>string/boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Use the call parameter as the key to cache the returned result, optional: lru, threadlocal, jcache, etc.&lt;/td>
&lt;td>Version above 2.1.0&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>validation&lt;/td>
&lt;td>&lt;methodName>.validation&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service Governance&lt;/td>
&lt;td>Whether to enable JSR303 standard annotation validation, if enabled, the annotations on method parameters will be validated&lt;/td>
&lt;td>Version 2.1.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="argument">argument&lt;/h3>
&lt;p>Method parameter configuration. Corresponding configuration class: &lt;code>org.apache.dubbo.config.ArgumentConfig&lt;/code>. This tag is a sub-tag of &lt;code>method&lt;/code>, which is used to describe the characteristics of method parameters, such as XML format:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:method&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;findXxx&amp;#34;&lt;/span> timeout=&lt;span style="color:#2aa198">&amp;#34;3000&amp;#34;&lt;/span> retries=&lt;span style="color:#2aa198">&amp;#34;2&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:argument&lt;/span> index=&lt;span style="color:#2aa198">&amp;#34;0&amp;#34;&lt;/span> callback=&lt;span style="color:#2aa198">&amp;#34;true&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/dubbo:method&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>index&lt;/td>
&lt;td>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>&lt;b>required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>identifier&lt;/td>
&lt;td>parameter index&lt;/td>
&lt;td>version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>type&lt;/td>
&lt;td>&lt;/td>
&lt;td>String&lt;/td>
&lt;td>choose one of index and index&lt;/td>
&lt;td>&lt;/td>
&lt;td>identification&lt;/td>
&lt;td>find parameter index by parameter type&lt;/td>
&lt;td>version 2.0.6 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>callback&lt;/td>
&lt;td>&lt;metodName>&lt;index>.callback&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>optional&lt;/td>
&lt;td>&lt;/td>
&lt;td>service governance&lt;/td>
&lt;td>whether the parameter is a callback interface, if it is callback, the service provider will generate a reverse proxy, and the consumer can be reversely called from the service provider , usually used for event push.&lt;/td>
&lt;td>Versions above 2.0.6&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="parameter">parameter&lt;/h3>
&lt;p>Option parameter configuration. Corresponding configuration class: &lt;code>java.util.Map&lt;/code>. At the same time, the label is a sub-label of &lt;code>protocol&lt;/code> or &lt;code>service&lt;/code> or &lt;code>provider&lt;/code> or &lt;code>reference&lt;/code> or &lt;code>consumer&lt;/code> or &lt;code>monitor&lt;/code> or &lt;code>registry&lt;/code> or &lt;code>metadata-config&lt;/code> or &lt;code>config-center&lt;/code>, used for configuration Custom parameters, this configuration item will be used as an extension point to set custom parameters.&lt;/p>
&lt;p>for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:protocol&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;napoli&amp;#34;&lt;/span>&lt;span style="color:#268bd2">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;lt;dubbo:parameter&lt;/span> key=&lt;span style="color:#2aa198">&amp;#34;http://10.20.160.198/wiki/display/dubbo/napoli.queue.name&amp;#34;&lt;/span> value=&lt;span style="color:#2aa198">&amp;#34;xxx&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;/dubbo:protocol&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can also:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-xml" data-lang="xml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">&amp;lt;dubbo:protocol&lt;/span> name=&lt;span style="color:#2aa198">&amp;#34;jms&amp;#34;&lt;/span> p:queue=&lt;span style="color:#2aa198">&amp;#34;xxx&amp;#34;&lt;/span> &lt;span style="color:#268bd2">/&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Attribute&lt;/th>
&lt;th>Corresponding URL parameter&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Required&lt;/th>
&lt;th>Default&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>key&lt;/td>
&lt;td>key&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service governance&lt;/td>
&lt;td>Routing parameter key&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>value&lt;/td>
&lt;td>value&lt;/td>
&lt;td>string&lt;/td>
&lt;td>&lt;b>Required&lt;/b>&lt;/td>
&lt;td>&lt;/td>
&lt;td>Service governance&lt;/td>
&lt;td>Routing parameter value&lt;/td>
&lt;td>Version 2.0.0 or later&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="environment-variables">Environment variables&lt;/h3>
&lt;p>The supported keys are the following two:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;code>dubbo.labels&lt;/code>, specify a list of key-value pairs configured in the URL, usually through JVM -D or system environment variables.&lt;/p>
&lt;p>Add the following configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># JVM&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>-Ddubbo.labels &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;tag1=value1; tag2=value2&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># environment variables&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DUBBO_LABELS &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;tag1=value1; tag2=value2&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The final generated URL will contain two keys tag1 and tag2: &lt;code>dubbo://xxx?tag1=value1&amp;amp;tag2=value2&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>dubbo.env.keys&lt;/code>, specify the environment variable key value, Dubbo will try to load each key from the environment variable&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># JVM&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>-Ddubbo.env.keys&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">&amp;#34;DUBBO_TAG1, DUBBO_TAG2&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># environment variables&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DUBBO_ENV_KEYS &lt;span style="color:#719e07">=&lt;/span> &lt;span style="color:#2aa198">&amp;#34;DUBBO_TAG1, DUBBO_TAG2&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The final generated URL will contain two keys DUBBO_TAG1 and DUBBO_TAG2: &lt;code>dubbo://xxx?DUBBO_TAG1=value1&amp;amp;DUBBO_TAG2=value2&lt;/code>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h3 id="other-configuration">Other configuration&lt;/h3>
&lt;h4 id="config-mode">config-mode&lt;/h4>
&lt;p>&lt;strong>background&lt;/strong>&lt;/p>
&lt;p>Some types of configuration class instances can only appear once in each dubbo application (such as &lt;code>ApplicationConfig&lt;/code>, &lt;code>MonitorConfig&lt;/code>, &lt;code>MetricsConfig&lt;/code>, &lt;code>SslConfig&lt;/code>, &lt;code>ModuleConfig&lt;/code>), and some can appear multiple times (such as &lt;code>RegistryConfig&lt;/code> , &lt;code>ProtocolConfig&lt;/code>, etc.).&lt;/p>
&lt;p>If the application accidentally scans multiple unique configuration class instances (for example, the user misconfigures two &lt;code>ApplicationConfig&lt;/code> in a dubbo application), which strategy should be used to deal with this situation? Is it throwing an exception directly? Is it to keep the former and ignore the latter? Is it to ignore the former and keep the latter? Or does it allow a certain form of coexistence (such as the attributes of the latter overriding the former)?&lt;/p>
&lt;p>Currently, the only configuration class type in dubbo and the configuration modes/strategies allowed by finding multiple instances of a unique configuration type are as follows.&lt;/p>
&lt;p>&lt;strong>Unique configuration class type&lt;/strong>&lt;/p>
&lt;p>&lt;code>ApplicationConfig&lt;/code>, &lt;code>MonitorConfig&lt;/code>, &lt;code>MetricsConfig&lt;/code>, &lt;code>SslConfig&lt;/code>, &lt;code>ModuleConfig&lt;/code>.&lt;/p>
&lt;p>The first four belong to the application level, and the last one belongs to the module level.&lt;/p>
&lt;p>&lt;strong>configuration mode&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;code>strict&lt;/code>: Strict mode. Throw an exception directly.&lt;/li>
&lt;li>&lt;code>override&lt;/code>: override mode. Ignore the former and keep the latter.&lt;/li>
&lt;li>&lt;code>ignore&lt;/code>: ignore pattern. Ignore the latter and keep the former.&lt;/li>
&lt;li>&lt;code>override_all&lt;/code>: attribute override mode. No matter whether the attribute value of the former is empty or not, the attribute of the latter is overwritten/set on the former.&lt;/li>
&lt;li>&lt;code>override_if_absent&lt;/code>: attribute override mode if absent. Only when the corresponding attribute value of the former is empty, can the attribute of the latter be overwritten/set on the former.&lt;/li>
&lt;/ul>
&lt;p>Note: The latter two also affect property overrides for configuration instances. Because dubbo has multiple configuration methods, that is, there are multiple configuration sources, and the configuration sources also have priorities. For example, a &lt;code>ServiceConfig&lt;/code> is configured through xml and the attribute &lt;code>version=1.0.0&lt;/code> is specified. At the same time, we configure &lt;code>dubbo.service.{interface}.version=2.0.0&lt;/code> in the external configuration (configuration center), Before the &lt;code>config-mode&lt;/code> configuration item is introduced, according to the original configuration source priority, &lt;code>version=2.0.0&lt;/code> of the final instance. However, after the &lt;code>config-mode&lt;/code> configuration item is introduced, the configuration priority rules are no longer so strict, that is, if &lt;code>config-mode is override_all&lt;/code> is specified, it is &lt;code>version=2.0.0&lt;/code>, if &lt;code>config-mode is override_if_absent&lt;/code> If it is &lt;code>version=1.0.0&lt;/code>, if &lt;code>config-mode&lt;/code> is other values, the property setting/overwriting will follow the original configuration priority.&lt;/p>
&lt;p>&lt;strong>Configuration method&lt;/strong>&lt;/p>
&lt;p>The configured key is &lt;code>dubbo.config.mode&lt;/code>, the configured values are as described above, and the default policy value is &lt;code>strict&lt;/code>. A sample configuration is shown below&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-properties" data-lang="properties">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># JVM -D&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>-Ddubbo.config.mode&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">strict&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># environment variables&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>DUBBO_CONFIG_MODE&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">strict&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># External configuration (configuration center), Environment of Spring application, dubbo.properties&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>dubbo.config.mode&lt;span style="color:#719e07">=&lt;/span>&lt;span style="color:#2aa198">strict&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>