<!-- 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!
```

@Test
    void testNotificationWithWrongBean() {
        Assertions.assertThrows(BeanCreationException.class, () -> {
            ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(resourcePath + "/consumer-notification.xml");
            ctx.start();
        });
    }
    @Test
    void testProperty() {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(resourcePath + "/service-class.xml");
        ctx.start();
        ServiceBean serviceBean = ctx.getBean(ServiceBean.class);
        String prefix = ((DemoServiceImpl) serviceBean.getRef()).getPrefix();
        assertThat(prefix, is("welcome:"));
    }
    @Test
    void testMetricsAggregation() {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(resourcePath + "/metrics-aggregation.xml");
        ctx.start();
        ConfigManager configManager = ApplicationModel.defaultModel().getApplicationConfigManager();
        MetricsConfig metricsBean = ctx.getBean(MetricsConfig.class);
        MetricsConfig metrics = configManager.getMetrics().get();
        assertTrue(metrics.getEnableJvm());
        assertEquals(metrics.getAggregation().getEnabled(), true);
        assertEquals(metrics.getAggregation().getBucketNum(), 5);
        assertEquals(metrics.getAggregation().getTimeWindowSeconds(), 120);
        assertEquals(metrics.getAggregation().getEnabled(), metricsBean.getAggregation().getEnabled());
        assertEquals(metrics.getAggregation().getBucketNum(), metricsBean.getAggregation().getBucketNum());
        assertEquals(metrics.getAggregation().getTimeWindowSeconds(), metricsBean.getAggregation().getTimeWindowSeconds());
    }