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

this.interfaceClass = interfaceClass;
        setInterface(interfaceClass == null ? null : interfaceClass.getName());
    }
    public void setInterface(String interfaceName) {
        this.interfaceName = interfaceName;
        if (StringUtils.isEmpty(id)) {
            id = interfaceName;
        }
    }
    public T getRef() {
        return ref;
    }
    public void setRef(T ref) {
        this.ref = ref;
    }
    @Parameter(excluded = true)
    public String getPath() {
        return path;
    }
    public void setPath(String path) {
        checkPathName(PATH_KEY, path);
        this.path = path;
    }
    public List<MethodConfig> getMethods() {
        return methods;
    }
    // 
    @SuppressWarnings("unchecked")
    public void setMethods(List<? extends MethodConfig> methods) {
        this.methods = (List<MethodConfig>) methods;