### 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

}
        setProvider(
                ConfigManager.getInstance()
                        .getDefaultProvider()
                        .orElseGet(() -> {
                            ProviderConfig providerConfig = new ProviderConfig();
                            providerConfig.refresh();
                            return providerConfig;
                        })
        );
    }
    private void checkProtocol() {
        if (CollectionUtils.isEmpty(protocols) && provider != null) {
            setProtocols(provider.getProtocols());
        }
        convertProtocolIdsToProtocols();
    }
    private void convertProtocolIdsToProtocols() {
        if (StringUtils.isEmpty(protocolIds) && CollectionUtils.isEmpty(protocols)) {
            List<String> configedProtocols = new ArrayList<>();
            configedProtocols.addAll(getSubProperties(Environment.getInstance()
                    .getExternalConfigurationMap(), PROTOCOLS_SUFFIX));
            configedProtocols.addAll(getSubProperties(Environment.getInstance()
                    .getAppExternalConfigurationMap(), PROTOCOLS_SUFFIX));
            protocolIds = String.join(",", configedProtocols);
        }
        if (StringUtils.isEmpty(protocolIds)) {
            if (CollectionUtils.isEmpty(protocols)) {
                setProtocols(
                        ConfigManager.getInstance().getDefaultProtocols()