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

use starting status in eureka when first registry

This commit is contained in:
theonefx
2021-01-11 22:54:10 +08:00
parent fd8a6a6f6c
commit 6c0edee13e
6 changed files with 221 additions and 28 deletions

View File

@@ -82,7 +82,7 @@ public final class NacosDataParserHandler {
}
NacosByteArrayResource nacosByteArrayResource = new NacosByteArrayResource(
configValue.getBytes(), configName);
nacosByteArrayResource.setFilename(getFileName(configName , extension));
nacosByteArrayResource.setFilename(getFileName(configName, extension));
List<PropertySource<?>> propertySourceList = propertySourceLoader
.load(configName, nacosByteArrayResource);
if (CollectionUtils.isEmpty(propertySourceList)) {
@@ -135,8 +135,8 @@ public final class NacosDataParserHandler {
return DEFAULT_EXTENSION;
}
private String getFileName(String name,String extension){
if(StringUtils.isEmpty(extension)){
private String getFileName(String name, String extension) {
if (StringUtils.isEmpty(extension)) {
return name;
}
if (StringUtils.isEmpty(name)) {
@@ -145,7 +145,7 @@ public final class NacosDataParserHandler {
int idx = name.lastIndexOf(DOT);
if (idx > 0 && idx < name.length() - 1) {
String ext = name.substring(idx + 1);
if(extension.equalsIgnoreCase(ext)){
if (extension.equalsIgnoreCase(ext)) {
return name;
}
}