<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.8</li>
<li>Operating System version: MacOS 15.17</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Define a Main class for start dubbo include:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ClassPathXmlApplicationContext parentContext = new ClassPathXmlApplicationContext(&quot;classpath:applicationContext-root.xml&quot;);
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {&quot;classpath:/configs/applicationContext-app.xml&quot; }, parentContext);
ApplicationContext.setContainer(context);
context.start();
System.in.read(); "><pre class="notranslate"><code class="notranslate">ClassPathXmlApplicationContext parentContext = new ClassPathXmlApplicationContext("classpath:applicationContext-root.xml");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"classpath:/configs/applicationContext-app.xml" }, parentContext);
ApplicationContext.setContainer(context);
context.start();
System.in.read(); 
</code></pre></div>
<p dir="auto">In applicationContext-root.xml declare：</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;dubbo:application name=&quot;dubbo-demo-api&quot; /&gt;
&lt;dubbo:registry protocol=&quot;zookeeper&quot; address=&quot;172.20.71.128:2181&quot; /&gt;"><pre class="notranslate"><code class="notranslate">&lt;dubbo:application name="dubbo-demo-api" /&gt;
&lt;dubbo:registry protocol="zookeeper" address="172.20.71.128:2181" /&gt;
</code></pre></div>
<p dir="auto">In applicationContext-app.xml declare:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;dubbo:service interface=&quot;org.demo.DemoService&quot; ref=&quot;demoService&quot; /&gt;
&lt;bean id=&quot;demoService&quot; class=&quot;org.demo.DemoServiceImpl&quot; /&gt;"><pre class="notranslate"><code class="notranslate"> &lt;dubbo:service interface="org.demo.DemoService" ref="demoService" /&gt;
&lt;bean id="demoService" class="org.demo.DemoServiceImpl" /&gt;
</code></pre></div>
<p dir="auto">If declare dubbo service like above，demoService can not export to zookeeper registry.</p>
<p dir="auto">In DubboBootstrap.java</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    private void exportServices() {
        configManager.getServices().forEach(sc -&gt; {
            // TODO, compatible with ServiceConfig.export()
            ServiceConfig serviceConfig = (ServiceConfig) sc;
            serviceConfig.setBootstrap(this);

            if (exportAsync) {
                ExecutorService executor = executorRepository.getServiceExporterExecutor();
                Future&lt;?&gt; future = executor.submit(() -&gt; {
                    sc.export();
                    exportedServices.add(sc);
                });
                asyncExportingFutures.add(future);
            } else {
                sc.export();
                exportedServices.add(sc);
            }
        });
    }"><pre class="notranslate"><code class="notranslate">    private void exportServices() {
        configManager.getServices().forEach(sc -&gt; {
            // TODO, compatible with ServiceConfig.export()
            ServiceConfig serviceConfig = (ServiceConfig) sc;
            serviceConfig.setBootstrap(this);

            if (exportAsync) {
                ExecutorService executor = executorRepository.getServiceExporterExecutor();
                Future&lt;?&gt; future = executor.submit(() -&gt; {
                    sc.export();
                    exportedServices.add(sc);
                });
                asyncExportingFutures.add(future);
            } else {
                sc.export();
                exportedServices.add(sc);
            }
        });
    }
</code></pre></div>
<p dir="auto">configManager.getServices() return empty.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>