mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
add test case and nacos watch
This commit is contained in:
@@ -18,7 +18,6 @@ package org.springframework.cloud.alibaba.nacos;
|
||||
|
||||
import com.alibaba.nacos.api.NacosFactory;
|
||||
import com.alibaba.nacos.api.config.ConfigService;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@@ -183,19 +183,19 @@ public class NacosPropertySourceLocator implements PropertySourceLocator {
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkDataIdFileExtension(String[] sharedDataIdArry) {
|
||||
private static void checkDataIdFileExtension(String[] dataIdArray) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (int i = 0; i < sharedDataIdArry.length; i++) {
|
||||
for (int i = 0; i < dataIdArray.length; i++) {
|
||||
boolean isLegal = false;
|
||||
for (String fileExtension : SUPPORT_FILE_EXTENSION) {
|
||||
if (sharedDataIdArry[i].indexOf(fileExtension) > 0) {
|
||||
if (dataIdArray[i].indexOf(fileExtension) > 0) {
|
||||
isLegal = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// add tips
|
||||
if (!isLegal) {
|
||||
stringBuilder.append(sharedDataIdArry[i] + ",");
|
||||
stringBuilder.append(dataIdArray[i] + ",");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user