apache / dubbo-admin

@@ -22,10 +22,12 @@
Loading
22 22
import org.apache.dubbo.admin.common.exception.ConfigurationException;
23 23
import org.apache.dubbo.admin.common.util.Constants;
24 24
import org.apache.dubbo.admin.registry.config.GovernanceConfiguration;
25 +
import org.apache.dubbo.admin.registry.mapping.AdminMappingListener;
25 26
import org.apache.dubbo.admin.registry.mapping.ServiceMapping;
26 27
import org.apache.dubbo.admin.registry.mapping.impl.NoOpServiceMapping;
27 28
import org.apache.dubbo.admin.registry.metadata.MetaDataCollector;
28 29
import org.apache.dubbo.admin.registry.metadata.impl.NoOpMetadataCollector;
30 +
import org.apache.dubbo.admin.service.impl.InstanceRegistryCache;
29 31
import org.apache.dubbo.common.URL;
30 32
import org.apache.dubbo.common.config.Environment;
31 33
import org.apache.dubbo.common.extension.ExtensionLoader;
@@ -39,7 +41,6 @@
Loading
39 41
import org.apache.dubbo.registry.client.ServiceDiscoveryFactory;
40 42
import org.apache.dubbo.rpc.model.ApplicationModel;
41 43
42 -
import org.springframework.beans.factory.annotation.Autowired;
43 44
import org.springframework.beans.factory.annotation.Value;
44 45
import org.springframework.context.annotation.Bean;
45 46
import org.springframework.context.annotation.Configuration;
@@ -100,9 +101,6 @@
Loading
100 101
    private URL registryUrl;
101 102
    private URL metadataUrl;
102 103
103 -
    @Autowired
104 -
    private MappingListener mappingListener;
105 -
106 104
    /*
107 105
     * generate dynamic configuration client
108 106
     */
@@ -226,11 +224,12 @@
Loading
226 224
227 225
    @Bean
228 226
    @DependsOn("metaDataCollector")
229 -
    ServiceMapping getServiceMapping() {
227 +
    ServiceMapping getServiceMapping(ServiceDiscovery serviceDiscovery, InstanceRegistryCache instanceRegistryCache) {
230 228
        ServiceMapping serviceMapping = new NoOpServiceMapping();
231 229
        if (metadataUrl == null) {
232 230
            return serviceMapping;
233 231
        }
232 +
        MappingListener mappingListener = new AdminMappingListener(serviceDiscovery, instanceRegistryCache);
234 233
        serviceMapping = ExtensionLoader.getExtensionLoader(ServiceMapping.class).getExtension(metadataUrl.getProtocol());
235 234
        serviceMapping.addMappingListener(mappingListener);
236 235
        serviceMapping.init(metadataUrl);

@@ -31,7 +31,6 @@
Loading
31 31
import org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener;
32 32
33 33
import com.google.common.collect.Sets;
34 -
import org.springframework.stereotype.Component;
35 34
36 35
import java.util.List;
37 36
import java.util.Map;
@@ -40,7 +39,6 @@
Loading
40 39
import java.util.concurrent.ConcurrentMap;
41 40
import java.util.stream.Collectors;
42 41
43 -
@Component
44 42
public class AdminMappingListener implements MappingListener {
45 43
46 44
    private static final URL CONSUMER_URL = new URL(Constants.ADMIN_PROTOCOL, NetUtils.getLocalHost(), 0, "",
Files Complexity Coverage
dubbo-admin-server/src/main/java/org/apache/dubbo/admin 18.69% 20.81%
Project Totals (144 files) 18.69% 20.81%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading