提交 861c6e34 编写于 作者: W william.liangf

DUBBO-163 没有dubbo.properties时不要打印WARN日志

git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@791 1a56cb94-b969-4eaa-88fa-be21384802f2
上级 25ac4986
......@@ -127,7 +127,7 @@ public class ConfigUtils {
path = Constants.DEFAULT_DUBBO_PROPERTIES;
}
}
PROPERTIES = ConfigUtils.loadProperties(path);
PROPERTIES = ConfigUtils.loadProperties(path, false, true);
}
}
}
......@@ -161,7 +161,11 @@ public class ConfigUtils {
}
public static Properties loadProperties(String fileName) {
return loadProperties(fileName, false);
return loadProperties(fileName, false, false);
}
public static Properties loadProperties(String fileName, boolean allowMultiFile) {
return loadProperties(fileName, false, false);
}
/**
......@@ -175,7 +179,7 @@ public class ConfigUtils {
* </ul>
* @throws IllegalStateException not allow multi-file, but multi-file exsit on class path.
*/
public static Properties loadProperties(String fileName, boolean allowMultiFile) {
public static Properties loadProperties(String fileName, boolean allowMultiFile, boolean allowEmptyFile) {
Properties properties = new Properties();
if (fileName.startsWith("/")) {
try {
......@@ -203,7 +207,9 @@ public class ConfigUtils {
}
if(list.size() == 0) {
logger.warn("No " + fileName + " found on the class path.");
if (allowEmptyFile) {
logger.warn("No " + fileName + " found on the class path.");
}
return properties;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册