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

### Environment

* Dubbo version: 2.7.4.1
* Java version: 1.8

### Actual Result

[https://github.com/apache/dubbo/blob/839d2a604e629ea9e96b964be09ae221e85312ba/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ApplicationModel.java#L80](https://github.com/apache/dubbo/blob/839d2a604e629ea9e96b964be09ae221e85312ba/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ApplicationModel.java#L80)

### Expected Result

```
initFrameworkExts
```
asyncReferringFutures.forEach(future -> {
            if (!future.isDone()) {
                future.cancel(true);
            }
        });
        asyncReferringFutures.clear();
        cache.destroyAll();
    }
    private void registerServiceInstance() {
        if (CollectionUtils.isEmpty(getServiceDiscoveries())) {
            return;
        }
        ApplicationConfig application = getApplication();
        String serviceName = application.getName();
        URL exportedURL = selectMetadataServiceExportedURL();
        String host = exportedURL.getHost();
        int port = exportedURL.getPort();
        ServiceInstance serviceInstance = createServiceInstance(serviceName, host, port);
        getServiceDiscoveries().forEach(serviceDiscovery -> serviceDiscovery.register(serviceInstance));
    }
    private URL selectMetadataServiceExportedURL() {
        URL selectedURL = null;
        SortedSet<String> urlValues = metadataService.getExportedURLs();
        for (String urlValue : urlValues) {
            URL url = URL.valueOf(urlValue);
            if (MetadataService.class.getName().equals(url.getServiceInterface())) {
                continue;
            }
            if ("rest".equals(url.getProtocol())) { 
                selectedURL = url;