<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

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

### Environment

* Dubbo version: 3.0.7
* Operating System version: Mac OS
* Java version: 8

### Steps to reproduce this issue

1. set dubbo.protocol.port=30880
2. define dubbo service to export
3. create an @Bean to invoke dubbo reference
4. start up spring boot application
5. service export port is 30880, metadata service export port is 20880

Pls. provide [GitHub address] to reproduce this issue.

### Expected Behavior

metadata service and instance export port is 30880

### Actual Behavior

metadata service and instance export port is 20880

### Issue code debug
![image](https://user-images.githubusercontent.com/7418602/169072305-1b0c83ab-0407-4bc0-aa1a-387c475d82f0.png)
![image](https://user-images.githubusercontent.com/7418602/169070767-406c3daa-ef0b-4b1a-89ef-44fb1cbcfa4f.png)
![image](https://user-images.githubusercontent.com/7418602/169071049-4607808e-9958-4f8d-888c-5f05135e2fbb.png)
![image](https://user-images.githubusercontent.com/7418602/169070937-8ac15446-5947-4a1f-8a2e-eba5c55e579f.png)


import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import java.io.IOException;
import java.util.Map;
import static org.apache.dubbo.common.constants.CommonConstants.APPLICATION_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_METADATA_STORAGE_TYPE;
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PORT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROTOCOL_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIMESTAMP_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
import static org.apache.dubbo.registry.client.metadata.ServiceInstanceMetadataUtils.METADATA_SERVICE_URL_PARAMS_PROPERTY_NAME;
public class MetadataServiceURLParamsMetadataCustomizerTest {
    public DefaultServiceInstance instance;
    private URL metadataServiceURL = URL.valueOf("dubbo://10.225.12.124:20880/org.apache.dubbo.metadata.MetadataService" +
        "?application=MetadataServiceURLParamsMetadataCustomizerTest&group=MetadataServiceURLParamsMetadataCustomizerTest" +
        "&interface=org.apache.dubbo.metadata.MetadataService&side=provider&timestamp=1637573430740&version=1.0.0");
    public static DefaultServiceInstance createInstance() {
        return new DefaultServiceInstance("A", "127.0.0.1", 20880, ApplicationModel.defaultModel());
    }
    @BeforeEach
    public void init() {
        instance = createInstance();
    }
    @AfterEach
    public void tearDown() throws IOException {
        Mockito.framework().clearInlineMocks();
    }
    @Test