From 25c680a6bfcee5d54b126ddd62bdac0fcf4c7a29 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Fri, 19 Jan 2018 16:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 2 +- .../com/xxl/job/admin/core/util/I18nUtil.java | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 9b071aec..9549f646 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -1157,7 +1157,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 13、任务依赖增强,新增任务类型 "流程任务",流程节点可挂载普通类型任务,承担任务依赖功能。现有子任务模型取消;需要考虑任务依赖死循环问题; - 14、分片任务某一分片失败,支持分片转移; - 15、调度中心触发任务后,先推送触发队列,异步触发,然后立即返回。降低quartz线程占用时长。 - +- 16、调度报表加载速度慢问题; ## 七、其他 diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java index e4dc8b1a..d158b5bb 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java @@ -23,14 +23,16 @@ public class I18nUtil { private static boolean prop_cache = false; public static Properties loadI18nProp(){ - if (prop_cache && prop == null) { - try { - Resource resource = new ClassPathResource(i18n_file); - EncodedResource encodedResource = new EncodedResource(resource,"UTF-8"); - prop = PropertiesLoaderUtils.loadProperties(encodedResource); - } catch (IOException e) { - logger.error(e.getMessage(), e); - } + if (prop_cache && prop != null) { + return prop; + } + + try { + Resource resource = new ClassPathResource(i18n_file); + EncodedResource encodedResource = new EncodedResource(resource,"UTF-8"); + prop = PropertiesLoaderUtils.loadProperties(encodedResource); + } catch (IOException e) { + logger.error(e.getMessage(), e); } return prop; }