由于Windows系统路径带有空格, 例如Program Files下面放tomcat,就会导致配置文件无法正确加载,而后台还不能给出准确的错误,所以把exception信息输出到日志中,有利于及时方便地发现问题的原因。

pull/1/head
zhangqunshi 9 years ago
parent 12b4fbd203
commit 1b5a3c9ae7

@ -32,7 +32,7 @@ public class PropertiesUtil {
in = new InputStreamReader(new FileInputStream(url.getPath()), "UTF-8"); in = new InputStreamReader(new FileInputStream(url.getPath()), "UTF-8");
prop.load(in); prop.load(in);
} catch (IOException e) { } catch (IOException e) {
logger.error("load {} error!", propertyFileName); logger.error("load {} error: " + e.getMessage(), propertyFileName);
} finally { } finally {
if (in != null) { if (in != null) {
try { try {

Loading…
Cancel
Save