1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Polish spring-cloud-incubator/spring-cloud-alibaba#543 : DubboMetadataService will be always exported

This commit is contained in:
mercyblitz 2019-04-11 00:54:08 +08:00
parent 9caa0f9742
commit be521de748
2 changed files with 2 additions and 12 deletions

View File

@ -30,7 +30,7 @@ public interface DubboMetadataService {
/**
* Get The json content of {@link ServiceRestMetadata} {@link Set}
*
* @return the non-null String
* @return <code>null</code> if present
*/
String getServiceRestMetadata();
}

View File

@ -25,7 +25,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.function.Supplier;
@ -43,7 +42,7 @@ public class DubboMetadataServiceExporter {
private ApplicationConfig applicationConfig;
@Autowired
private PublishingDubboMetadataService dubboMetadataService;
private DubboMetadataService dubboMetadataService;
@Autowired
private Supplier<ProtocolConfig> protocolConfigSupplier;
@ -65,15 +64,6 @@ public class DubboMetadataServiceExporter {
return;
}
if (StringUtils.isEmpty(dubboMetadataService.getServiceRestMetadata())) {
// If there is no REST metadata, DubboMetadataConfigService will not be exported.
if (logger.isInfoEnabled()) {
logger.info("There is no REST metadata, the Dubbo service[{}] will not be exported.",
dubboMetadataService.getClass().getName());
}
return;
}
serviceConfig = new ServiceConfig<>();
serviceConfig.setInterface(DubboMetadataService.class);