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:
@@ -37,7 +37,8 @@ public class NacosConfigBootstrapConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public NacosPropertySourceLocator nacosPropertySourceLocator(NacosConfigProperties nacosConfigProperties) {
|
||||
public NacosPropertySourceLocator nacosPropertySourceLocator(
|
||||
NacosConfigProperties nacosConfigProperties) {
|
||||
return new NacosPropertySourceLocator(nacosConfigProperties);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -51,7 +51,8 @@ public class NacosConfigEndpointAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public NacosConfigHealthIndicator nacosConfigHealthIndicator() {
|
||||
return new NacosConfigHealthIndicator(nacosConfigProperties.configServiceInstance());
|
||||
return new NacosConfigHealthIndicator(
|
||||
nacosConfigProperties.configServiceInstance());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user