资源路径包含空格或中文时,资源文件加载不到的问题修复。From github:zhangqunshi

v1.6
xueli.xue 8 years ago
parent 12b4fbd203
commit e287195bf4

@ -32,13 +32,13 @@ 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(e.getMessage(), e);
} finally { } finally {
if (in != null) { if (in != null) {
try { try {
in.close(); in.close();
} catch (IOException e) { } catch (IOException e) {
logger.error("close {} error!", propertyFileName); logger.error(e.getMessage(), e);
} }
} }
} }

Loading…
Cancel
Save