### Environment

* Dubbo version: 2.7.3
* Operating System version: CentOS7
* Java version: 1.8

### Steps to reproduce this issue

1. Set two protocal, with different "register" attribute

```xml
<dubbo:protocol name="dubbo" port="8751" register="true"  />
<dubbo:protocol name="hessian" port="8752" register="false" />
```

2. use the zookeeper registry center

```xml
<dubbo:registry address="..." file="./.dubbo_cache" />
```

3. start the server and view the provider in zkCli


### Expected Result
only the dubbo is registed

### Actual Result
the dubbo and hession protocol are registed

* @since 2.7.0
                 * ServiceData Store
                 */
                MetadataReportService metadataReportService = null;
                if ((metadataReportService = getMetadataReportService()) != null) {
                    metadataReportService.publishProvider(url);
                }
            }
        }
        this.urls.add(url);
    }
    @SuppressWarnings({"unchecked", "rawtypes"})
    /**
     * always export injvm
     */
    private void exportLocal(URL url) {
        URL local = URLBuilder.from(url)
                .setProtocol(LOCAL_PROTOCOL)
                .setHost(LOCALHOST_VALUE)
                .setPort(0)
                .build();
        Exporter<?> exporter = protocol.export(
                PROXY_FACTORY.getInvoker(ref, (Class) interfaceClass, local));
        exporters.add(exporter);
        logger.info("Export dubbo service " + interfaceClass.getName() + " to local registry url : " + local);
    }
    private Optional<String> getContextPath(ProtocolConfig protocolConfig) {
        String contextPath = protocolConfig.getContextpath();
        if (StringUtils.isEmpty(contextPath) && provider != null) {
            contextPath = provider.getContextpath();