Commit 3b4ed9b7 by 房斌

去掉无关的注入,清理配置。

parent 745a83e3
...@@ -19,9 +19,6 @@ package com.secoo.mall.dubbo.monitor.config; ...@@ -19,9 +19,6 @@ package com.secoo.mall.dubbo.monitor.config;
import com.secoo.mall.dubbo.monitor.dubbo.Constants.Constants; import com.secoo.mall.dubbo.monitor.dubbo.Constants.Constants;
import com.secoo.mall.dubbo.monitor.dubbo.exception.ConfigurationException; import com.secoo.mall.dubbo.monitor.dubbo.exception.ConfigurationException;
import com.secoo.mall.dubbo.monitor.dubbo.metadata.MetaDataCollector;
import com.secoo.mall.dubbo.monitor.dubbo.metadata.impl.NoOpMetadataCollector;
import com.secoo.mall.dubbo.monitor.dubbo.register.GovernanceConfiguration;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
...@@ -80,50 +77,9 @@ public class ConfigCenter { ...@@ -80,50 +77,9 @@ public class ConfigCenter {
/* /*
* generate dynamic configuration client
*/
@Bean("governanceConfiguration")
GovernanceConfiguration getDynamicConfiguration() {
GovernanceConfiguration dynamicConfiguration = null;
if (StringUtils.isNotEmpty(configCenter)) {
configCenterUrl = formUrl(configCenter, configCenterGroup, username, password);
dynamicConfiguration = ExtensionLoader.getExtensionLoader(GovernanceConfiguration.class).getExtension(configCenterUrl.getProtocol());
dynamicConfiguration.setUrl(configCenterUrl);
dynamicConfiguration.init();
String config = dynamicConfiguration.getConfig(Constants.GLOBAL_CONFIG_PATH);
if (StringUtils.isNotEmpty(config)) {
Arrays.stream(config.split("\n")).forEach( s -> {
if(s.startsWith(Constants.REGISTRY_ADDRESS)) {
String registryAddress = s.split("=")[1].trim();
registryUrl = formUrl(registryAddress, configCenterGroup, username, password);
} else if (s.startsWith(Constants.METADATA_ADDRESS)) {
metadataUrl = formUrl(s.split("=")[1].trim(), configCenterGroup, username, password);
}
});
}
}
if (dynamicConfiguration == null) {
if (StringUtils.isNotEmpty(registryAddress)) {
registryUrl = formUrl(registryAddress, registryGroup, username, password);
dynamicConfiguration = ExtensionLoader.getExtensionLoader(GovernanceConfiguration.class).getExtension(registryUrl.getProtocol());
dynamicConfiguration.setUrl(registryUrl);
dynamicConfiguration.init();
logger.warn("you are using dubbo.registry.address, which is not recommend, please refer to: https://github.com/apache/incubator-dubbo-admin/wiki/Dubbo-Admin-configuration");
} else {
throw new ConfigurationException("Either config center or registry address is needed, please refer to https://github.com/apache/incubator-dubbo-admin/wiki/Dubbo-Admin-configuration");
//throw exception
}
}
return dynamicConfiguration;
}
/*
* generate registry client * generate registry client
*/ */
@Bean @Bean
@DependsOn("governanceConfiguration")
Registry getRegistry() { Registry getRegistry() {
Registry registry = null; Registry registry = null;
if (registryUrl == null) { if (registryUrl == null) {
...@@ -136,30 +92,6 @@ public class ConfigCenter { ...@@ -136,30 +92,6 @@ public class ConfigCenter {
registry = registryFactory.getRegistry(registryUrl); registry = registryFactory.getRegistry(registryUrl);
return registry; return registry;
} }
/*
* generate metadata client
*/
@Bean
@DependsOn("governanceConfiguration")
MetaDataCollector getMetadataCollector() {
MetaDataCollector metaDataCollector = new NoOpMetadataCollector();
if (metadataUrl == null) {
if (StringUtils.isNotEmpty(metadataAddress)) {
metadataUrl = formUrl(metadataAddress, metadataGroup, username, password);
metadataUrl = metadataUrl.addParameter(CLUSTER_KEY, cluster);
}
}
if (metadataUrl != null) {
metaDataCollector = ExtensionLoader.getExtensionLoader(MetaDataCollector.class).getExtension(metadataUrl.getProtocol());
metaDataCollector.setUrl(metadataUrl);
metaDataCollector.init();
} else {
logger.warn("you are using dubbo.registry.address, which is not recommend, please refer to: https://github.com/apache/incubator-dubbo-admin/wiki/Dubbo-Admin-configuration");
}
return metaDataCollector;
}
private URL formUrl(String config, String group, String username, String password) { private URL formUrl(String config, String group, String username, String password) {
URL url = URL.valueOf(config); URL url = URL.valueOf(config);
if (StringUtils.isNotEmpty(group)) { if (StringUtils.isNotEmpty(group)) {
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.secoo.mall.dubbo.monitor.dubbo.metadata;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.SPI;
import org.apache.dubbo.metadata.identifier.MetadataIdentifier;
@SPI("zookeeper")
public interface MetaDataCollector {
void setUrl(URL url);
URL getUrl();
void init();
String getProviderMetaData(MetadataIdentifier key);
String getConsumerMetaData(MetadataIdentifier key);
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.secoo.mall.dubbo.monitor.dubbo.metadata.impl;
import com.secoo.mall.dubbo.monitor.dubbo.metadata.MetaDataCollector;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.metadata.identifier.MetadataIdentifier;
public class NoOpMetadataCollector implements MetaDataCollector {
@Override
public void setUrl(URL url) {
}
@Override
public URL getUrl() {
return null;
}
@Override
public void init() {
}
@Override
public String getProviderMetaData(MetadataIdentifier key) {
return null;
}
@Override
public String getConsumerMetaData(MetadataIdentifier key) {
return null;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.secoo.mall.dubbo.monitor.dubbo.metadata.impl;
import com.secoo.mall.dubbo.monitor.dubbo.Constants.Constants;
import com.secoo.mall.dubbo.monitor.dubbo.metadata.MetaDataCollector;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.metadata.identifier.MetadataIdentifier;
public class ZookeeperMetaDataCollector implements MetaDataCollector {
private static final Logger logger = LoggerFactory.getLogger(ZookeeperMetaDataCollector.class);
private CuratorFramework client;
private URL url;
private String root;
private final static String DEFAULT_ROOT = "dubbo";
@Override
public void setUrl(URL url) {
this.url = url;
}
@Override
public URL getUrl() {
return url;
}
@Override
public void init() {
String group = url.getParameter(Constants.GROUP_KEY, DEFAULT_ROOT);
if (!group.startsWith(Constants.PATH_SEPARATOR)) {
group = Constants.PATH_SEPARATOR + group;
}
root = group;
client = CuratorFrameworkFactory.newClient(url.getAddress(), new ExponentialBackoffRetry(1000, 3));
client.start();
}
@Override
public String getProviderMetaData(MetadataIdentifier key) {
return doGetMetadata(key);
}
@Override
public String getConsumerMetaData(MetadataIdentifier key) {
return doGetMetadata(key);
}
private String getNodePath(MetadataIdentifier metadataIdentifier) {
return toRootDir() + metadataIdentifier.getUniqueKey(MetadataIdentifier.KeyTypeEnum.PATH);
}
private String toRootDir() {
if (root.equals(Constants.PATH_SEPARATOR)) {
return root;
}
return root + Constants.PATH_SEPARATOR;
}
private String doGetMetadata(MetadataIdentifier identifier) {
//TODO error handing
try {
String path = getNodePath(identifier);
if (client.checkExists().forPath(path) == null) {
return null;
}
return new String(client.getData().forPath(path));
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return null;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.secoo.mall.dubbo.monitor.dubbo.register;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.SPI;
@SPI("zookeeper")
public interface GovernanceConfiguration {
void init();
void setUrl(URL url);
URL getUrl();
String setConfig(String key, String value);
String getConfig(String key);
boolean deleteConfig(String key);
String setConfig(String group, String key, String value);
String getConfig(String group, String key);
boolean deleteConfig(String group, String key);
String getPath(String key);
String getPath(String group, String key);
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.secoo.mall.dubbo.monitor.dubbo.register.impl;
import com.secoo.mall.dubbo.monitor.dubbo.Constants.Constants;
import com.secoo.mall.dubbo.monitor.dubbo.register.GovernanceConfiguration;
import org.apache.commons.lang3.StringUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger;
import org.apache.dubbo.common.logger.LoggerFactory;
public class ZookeeperConfiguration implements GovernanceConfiguration {
private static final Logger logger = LoggerFactory.getLogger(ZookeeperConfiguration.class);
private CuratorFramework zkClient;
private URL url;
private String root;
@Override
public void setUrl(URL url) {
this.url = url;
}
@Override
public URL getUrl() {
return url;
}
@Override
public void init() {
if (url == null) {
throw new IllegalStateException("server url is null, cannot init");
}
CuratorFrameworkFactory.Builder zkClientBuilder = CuratorFrameworkFactory.builder().
connectString(url.getAddress()).
retryPolicy(new ExponentialBackoffRetry(1000, 3));
if (StringUtils.isNotEmpty(url.getUsername()) && StringUtils.isNotEmpty(url.getPassword())) {
// add authorization
String auth = url.getUsername() + ":" + url.getPassword();
zkClientBuilder.authorization("digest", auth.getBytes());
}
zkClient = zkClientBuilder.build();
String group = url.getParameter(Constants.GROUP_KEY, Constants.DEFAULT_ROOT);
if (!group.startsWith(Constants.PATH_SEPARATOR)) {
group = Constants.PATH_SEPARATOR + group;
}
root = group;
zkClient.start();
}
@Override
public String setConfig(String key, String value) {
return setConfig(null, key, value);
}
@Override
public String getConfig(String key) {
return getConfig(null, key);
}
@Override
public boolean deleteConfig(String key) {
return deleteConfig(null, key);
}
@Override
public String setConfig(String group, String key, String value) {
if (key == null || value == null) {
throw new IllegalArgumentException("key or value cannot be null");
}
String path = getNodePath(key, group);
try {
if (zkClient.checkExists().forPath(path) == null) {
zkClient.create().creatingParentsIfNeeded().forPath(path);
}
zkClient.setData().forPath(path, value.getBytes());
return value;
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return null;
}
@Override
public String getConfig(String group, String key) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
String path = getNodePath(key, group);
try {
if (zkClient.checkExists().forPath(path) == null) {
return null;
}
return new String(zkClient.getData().forPath(path));
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return null;
}
@Override
public boolean deleteConfig(String group, String key) {
if (key == null) {
throw new IllegalArgumentException("key cannot be null");
}
String path = getNodePath(key, group);
try {
zkClient.delete().forPath(path);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return false;
}
return true;
}
@Override
public String getPath(String key) {
return getNodePath(key, null);
}
@Override
public String getPath(String group, String key) {
return getNodePath(key, group);
}
private String getNodePath(String path, String group) {
if (path == null) {
throw new IllegalArgumentException("path cannot be null");
}
return toRootDir(group) + path;
}
private String toRootDir(String group) {
if (group != null) {
if (!group.startsWith(Constants.PATH_SEPARATOR)) {
root = Constants.PATH_SEPARATOR + group;
} else {
root = group;
}
}
if (root.equals(Constants.PATH_SEPARATOR)) {
return root;
}
return root + Constants.PATH_SEPARATOR;
}
}
...@@ -33,7 +33,6 @@ public interface ConsumerService { ...@@ -33,7 +33,6 @@ public interface ConsumerService {
List<Consumer> findByService(String serviceName); List<Consumer> findByService(String serviceName);
String getConsumerMetadata(MetadataIdentifier consumerIdentifier);
List<Consumer> findAll(); List<Consumer> findAll();
......
...@@ -20,7 +20,6 @@ package com.secoo.mall.dubbo.monitor.dubbo.service; ...@@ -20,7 +20,6 @@ package com.secoo.mall.dubbo.monitor.dubbo.service;
import com.secoo.mall.dubbo.monitor.dubbo.model.domain.Provider; import com.secoo.mall.dubbo.monitor.dubbo.model.domain.Provider;
import com.secoo.mall.dubbo.monitor.dubbo.model.dto.ServiceDTO; import com.secoo.mall.dubbo.monitor.dubbo.model.dto.ServiceDTO;
import org.apache.dubbo.metadata.identifier.MetadataIdentifier;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -47,7 +46,6 @@ public interface ProviderService { ...@@ -47,7 +46,6 @@ public interface ProviderService {
Provider findProvider(String id); Provider findProvider(String id);
String getProviderMetaData(MetadataIdentifier providerIdentifier);
/** /**
* Get all provider's service name * Get all provider's service name
......
...@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -38,7 +38,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
@Component
public class RegistryServerSync implements InitializingBean, DisposableBean, NotifyListener , CommandLineRunner { public class RegistryServerSync implements InitializingBean, DisposableBean, NotifyListener , CommandLineRunner {
private static final Logger logger = LoggerFactory.getLogger(RegistryServerSync.class); private static final Logger logger = LoggerFactory.getLogger(RegistryServerSync.class);
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
package com.secoo.mall.dubbo.monitor.dubbo.service.impl; package com.secoo.mall.dubbo.monitor.dubbo.service.impl;
import com.secoo.mall.dubbo.monitor.dubbo.metadata.MetaDataCollector;
import com.secoo.mall.dubbo.monitor.dubbo.register.GovernanceConfiguration;
import com.secoo.mall.dubbo.monitor.dubbo.service.RegistryServerSync; import com.secoo.mall.dubbo.monitor.dubbo.service.RegistryServerSync;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.logger.Logger; import org.apache.dubbo.common.logger.Logger;
...@@ -37,12 +35,6 @@ public class AbstractService { ...@@ -37,12 +35,6 @@ public class AbstractService {
protected Registry registry; protected Registry registry;
@Autowired @Autowired
protected GovernanceConfiguration dynamicConfiguration;
@Autowired
protected MetaDataCollector metaDataCollector;
@Autowired
private RegistryServerSync sync; private RegistryServerSync sync;
public ConcurrentMap<String, ConcurrentMap<String, Map<String, URL>>> getRegistryCache() { public ConcurrentMap<String, ConcurrentMap<String, Map<String, URL>>> getRegistryCache() {
......
...@@ -44,10 +44,6 @@ public class ConsumerServiceImpl extends AbstractService implements ConsumerServ ...@@ -44,10 +44,6 @@ public class ConsumerServiceImpl extends AbstractService implements ConsumerServ
return SyncUtils.url2ConsumerList(findAllConsumerUrl()); return SyncUtils.url2ConsumerList(findAllConsumerUrl());
} }
@Override
public String getConsumerMetadata(MetadataIdentifier consumerIdentifier) {
return metaDataCollector.getConsumerMetaData(consumerIdentifier);
}
private Map<String, URL> findAllConsumerUrl() { private Map<String, URL> findAllConsumerUrl() {
Map<String, String> filter = new HashMap<String, String>(); Map<String, String> filter = new HashMap<String, String>();
......
...@@ -29,6 +29,7 @@ import com.secoo.mall.dubbo.monitor.utils.Tool; ...@@ -29,6 +29,7 @@ import com.secoo.mall.dubbo.monitor.utils.Tool;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.metadata.identifier.MetadataIdentifier; import org.apache.dubbo.metadata.identifier.MetadataIdentifier;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
...@@ -37,7 +38,7 @@ import java.util.regex.Matcher; ...@@ -37,7 +38,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component @Service
public class ProviderServiceImpl extends AbstractService implements ProviderService { public class ProviderServiceImpl extends AbstractService implements ProviderService {
...@@ -50,11 +51,6 @@ public class ProviderServiceImpl extends AbstractService implements ProviderServ ...@@ -50,11 +51,6 @@ public class ProviderServiceImpl extends AbstractService implements ProviderServ
} }
//todo 看不懂
@Override
public String getProviderMetaData(MetadataIdentifier providerIdentifier) {
return metaDataCollector.getProviderMetaData(providerIdentifier);
}
//删除服务 //删除服务
......
package com.secoo.mall.dubbo.spring.boot.autoconfigure; package com.secoo.mall.dubbo.spring.boot.autoconfigure;
import com.alibaba.fastjson.JSON;
import com.secoo.mall.common.util.date.DateUtil; import com.secoo.mall.common.util.date.DateUtil;
import com.secoo.mall.dubbo.monitor.dubbo.service.ProviderService;
import org.apache.catalina.connector.Connector; import org.apache.catalina.connector.Connector;
import org.apache.dubbo.config.DubboShutdownHook; import org.apache.dubbo.config.DubboShutdownHook;
import org.apache.tomcat.util.threads.ThreadPoolExecutor; import org.apache.tomcat.util.threads.ThreadPoolExecutor;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
...@@ -22,6 +25,8 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen ...@@ -22,6 +25,8 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
private ApplicationContext context; private ApplicationContext context;
private static final int TIMEOUT = 10; private static final int TIMEOUT = 10;
private volatile Connector connector; private volatile Connector connector;
@Autowired
ProviderService providerService;
//容器初始化后执行 //容器初始化后执行
@Override @Override
...@@ -36,6 +41,8 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen ...@@ -36,6 +41,8 @@ public class GracefullyShoutDown implements CommandLineRunner, ApplicationListen
}else{ }else{
logger.info("dubbo unreister obj is null"); logger.info("dubbo unreister obj is null");
} }
logger.info(JSON.toJSONString("query--------->"+providerService.getServiceDTOSByQuery("ip", "172.17.76.196", "")));
} }
//容器关闭后执行 //容器关闭后执行
......
...@@ -4,7 +4,9 @@ import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrap ...@@ -4,7 +4,9 @@ import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrap
import com.secoo.mall.common.condition.BateEnvCondition; import com.secoo.mall.common.condition.BateEnvCondition;
import com.secoo.mall.common.util.sys.SystemUtil; import com.secoo.mall.common.util.sys.SystemUtil;
import com.secoo.mall.dubbo.monitor.config.ConfigCenter; import com.secoo.mall.dubbo.monitor.config.ConfigCenter;
import com.secoo.mall.dubbo.monitor.dubbo.service.ProviderService;
import com.secoo.mall.dubbo.monitor.dubbo.service.RegistryServerSync; import com.secoo.mall.dubbo.monitor.dubbo.service.RegistryServerSync;
import com.secoo.mall.dubbo.monitor.dubbo.service.impl.ProviderServiceImpl;
import com.secoo.mall.dubbo.swagger.annotations.EnableDubboSwagger; import com.secoo.mall.dubbo.swagger.annotations.EnableDubboSwagger;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -52,15 +54,15 @@ public class MatrixDubboAutoConfiguration { ...@@ -52,15 +54,15 @@ public class MatrixDubboAutoConfiguration {
return new GracefullyShoutDown(); return new GracefullyShoutDown();
} }
// @Bean @Bean
// public RegistryServerSync createSynObject(){ public RegistryServerSync createSynObject(){
// return new RegistryServerSync(); return new RegistryServerSync();
// } }
// @Bean @Bean
// public ConfigCenter createSynConfig(){ ProviderService createProviderService(){
// return new ConfigCenter(); return new ProviderServiceImpl();
// } }
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment