- [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/wiki/FAQ) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: latest

### Step to reproduce this issue

1. export a rest service DemoService with a url: rest://127.0.0.1:4444/test/
2. then we will get a real rest service with rest://127.0.0.1:4444/test/DemoService
3. but when we export a rest service DemoService with a url: rest://127.0.0.1:4444/test
4. then we will get a real rest service with rest://127.0.0.1:4444/DemoService

Those are the different results, in the second case the context path test is missing.
So users use explicit exporter and invoker to call rest services, they would feel puzzled.

We should fix it by modifying getContextPath method.

.setDefaultSocketConfig(socketConfig)
                .build();
        ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient);
        ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build();
        clients.add(client);
        client.register(RpcContextFilter.class);
        for (String clazz : Constants.COMMA_SPLIT_PATTERN.split(url.getParameter(Constants.EXTENSION_KEY, ""))) {
            if (!StringUtils.isEmpty(clazz)) {
                try {
                    client.register(Thread.currentThread().getContextClassLoader().loadClass(clazz.trim()));
                } catch (ClassNotFoundException e) {
                    throw new RpcException("Error loading JAX-RS extension class: " + clazz.trim(), e);
                }
            }
        }
        
        ResteasyWebTarget target = client.target("http://" + url.getHost() + ":" + url.getPort() + "/" + getContextPath(url));
        return target.proxy(serviceType);
    }
    @Override
    protected int getErrorCode(Throwable e) {
        
        return super.getErrorCode(e);
    }
    @Override
    public void destroy() {
        super.destroy();
        if (connectionMonitor != null) {
            connectionMonitor.shutdown();
        }