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

- [ ] 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: xxx
* Operating System version: xxx
* Java version: xxx

### Steps to reproduce this issue

```xml
    <bean id="sayHi" class="org.apache.dubbo.samples.provider.GreetingsServiceImpl"/>

    <dubbo:service id="GreetingsServiceRef1" interface="org.apache.dubbo.samples.api.GreetingsService" ref="sayHi">
        <dubbo:method name="sayHi" timeout="1000" retries="3"/>
    </dubbo:service>
```

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

### Expected Behavior

<!-- What do you expect from the above steps？-->

### Actual Behavior

<!-- What actually happens? -->

If there is an exception, please attach the exception trace:

```
Just put your stack trace here!
```

);
        ctx.start();
        testProviderXml(ctx);
    }
    private void testProviderXml(ApplicationContext context) {
        String appName = "demo-provider";
        Map<String, ApplicationConfig> applicationConfigMap = context.getBeansOfType(ApplicationConfig.class);
        ApplicationConfig providerAppConfig = context.getBean(appName, ApplicationConfig.class);
        assertNotNull(providerAppConfig);
        assertEquals(appName, providerAppConfig.getName());
        assertEquals(appName, providerAppConfig.getId());
        ProtocolConfig protocolConfig = context.getBean(ProtocolConfig.class);
        assertThat(protocolConfig, not(nullValue()));
        assertThat(protocolConfig.getName(), is("dubbo"));
        assertThat(protocolConfig.getPort(), is(20813));
        ApplicationConfig applicationConfig = context.getBean(ApplicationConfig.class);
        assertThat(applicationConfig, not(nullValue()));
        assertThat(applicationConfig.getName(), is("demo-provider"));
        RegistryConfig registryConfig = context.getBean(RegistryConfig.class);
        assertThat(registryConfig, not(nullValue()));
        assertThat(registryConfig.getAddress(), is("N/A"));
        DemoService service = context.getBean(DemoService.class);
        assertThat(service, not(nullValue()));
    }
    @Test
    void testMultiProtocol() {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(resourcePath + "/multi-protocol.xml");
        ctx.start();
        Map<String, ProtocolConfig> protocolConfigMap = ctx.getBeansOfType(ProtocolConfig.class);
        assertThat(protocolConfigMap.size(), is(2));