<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/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" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/wiki/FAQ">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: latest</li>
</ul>
<h3 dir="auto">Step to reproduce this issue</h3>
<ol dir="auto">
<li>export a rest service DemoService with a url: rest://127.0.0.1:4444/test/</li>
<li>then we will get a real rest service with rest://127.0.0.1:4444/test/DemoService</li>
<li>but when we export a rest service DemoService with a url: rest://127.0.0.1:4444/test</li>
<li>then we will get a real rest service with rest://127.0.0.1:4444/DemoService</li>
</ol>
<p dir="auto">Those are the different results, in the second case the context path test is missing.<br>
So users use explicit exporter and invoker to call rest services, they would feel puzzled.</p>
<p dir="auto">We should fix it by modifying getContextPath method.</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/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/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.4-SNAPSHOT</li>
<li>Operating System version: win7</li>
<li>Java version: 8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>使用springboot，在application.yml无法使用<br>
dubbo:<br>
metircs:<br>
port: 20880<br>
protocol: dubbo</li>
</ol>