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

This commit is contained in:
xueli.xue 2017-04-24 16:45:20 +08:00
parent 12b4fbd203
commit e287195bf4
1 changed files with 2 additions and 2 deletions

View File

@ -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);
} }
} }
} }