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

fix(nacos): Repair to create a large number of Nacos*Service problems

This commit is contained in:
chuntaojun
2019-11-06 21:26:55 +08:00
34 changed files with 141 additions and 53 deletions

View File

@@ -37,7 +37,8 @@ public class NacosConfigBootstrapConfiguration {
}
@Bean
public NacosPropertySourceLocator nacosPropertySourceLocator(NacosConfigProperties nacosConfigProperties) {
public NacosPropertySourceLocator nacosPropertySourceLocator(
NacosConfigProperties nacosConfigProperties) {
return new NacosPropertySourceLocator(nacosConfigProperties);
}

View File

@@ -363,8 +363,10 @@ public class NacosConfigProperties {
public ConfigService configServiceInstance() {
if (null == configService) {
try {
configService = NacosFactory.createConfigService(getConfigServiceProperties());
} catch (NacosException e) {
configService = NacosFactory
.createConfigService(getConfigServiceProperties());
}
catch (NacosException e) {
log.error("create naming service error!properties={},e=,", this, e);
return null;
}

View File

@@ -51,7 +51,8 @@ public class NacosConfigEndpointAutoConfiguration {
@Bean
public NacosConfigHealthIndicator nacosConfigHealthIndicator() {
return new NacosConfigHealthIndicator(nacosConfigProperties.configServiceInstance());
return new NacosConfigHealthIndicator(
nacosConfigProperties.configServiceInstance());
}
}