Kaynağa Gözat

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

xueli.xue 8 yıl önce
ebeveyn
işleme
e287195bf4

+ 2 - 2
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/PropertiesUtil.java Dosyayı Görüntüle

32
 			in = new InputStreamReader(new FileInputStream(url.getPath()), "UTF-8");
32
 			in = new InputStreamReader(new FileInputStream(url.getPath()), "UTF-8");
33
 			prop.load(in);
33
 			prop.load(in);
34
 		} catch (IOException e) {
34
 		} catch (IOException e) {
35
-			logger.error("load {} error!", propertyFileName);
35
+			logger.error(e.getMessage(), e);
36
 		} finally {
36
 		} finally {
37
 			if (in != null) {
37
 			if (in != null) {
38
 				try {
38
 				try {
39
 					in.close();
39
 					in.close();
40
 				} catch (IOException e) {
40
 				} catch (IOException e) {
41
-					logger.error("close {} error!", propertyFileName);
41
+					logger.error(e.getMessage(), e);
42
 				}
42
 				}
43
 			}
43
 			}
44
 		}
44
 		}