Commit 60fccc8b by xuxueli

后端代码国际化定制

parent 0346ddbb
...@@ -24,9 +24,11 @@ public class I18nUtil { ...@@ -24,9 +24,11 @@ public class I18nUtil {
private static Logger logger = LoggerFactory.getLogger(I18nUtil.class); private static Logger logger = LoggerFactory.getLogger(I18nUtil.class);
private static Properties prop = null; private static Properties prop = null;
private static long lastCacheTim = 0L;
public static Properties loadI18nProp(){ public static Properties loadI18nProp(){
if (prop != null) { if (prop != null && (System.currentTimeMillis()-lastCacheTim)<3*1000) {
//return prop; return prop;
} }
try { try {
// bild i18n prop // bild i18n prop
...@@ -38,9 +40,11 @@ public class I18nUtil { ...@@ -38,9 +40,11 @@ public class I18nUtil {
Resource resource = new ClassPathResource(i18nFile); Resource resource = new ClassPathResource(i18nFile);
EncodedResource encodedResource = new EncodedResource(resource,"UTF-8"); EncodedResource encodedResource = new EncodedResource(resource,"UTF-8");
prop = PropertiesLoaderUtils.loadProperties(encodedResource); prop = PropertiesLoaderUtils.loadProperties(encodedResource);
lastCacheTim = System.currentTimeMillis();
} catch (IOException e) { } catch (IOException e) {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
} }
logger.warn("---111---");
return prop; return prop;
} }
......
...@@ -108,7 +108,7 @@ jobinfo_field_jobgroup=执行器 ...@@ -108,7 +108,7 @@ jobinfo_field_jobgroup=执行器
jobinfo_field_jobdesc=任务描述 jobinfo_field_jobdesc=任务描述
jobinfo_field_gluetype=运行模式 jobinfo_field_gluetype=运行模式
jobinfo_field_executorparam=任务参数 jobinfo_field_executorparam=任务参数
jobinfo_field_cron_unvalid=请输入格式正确的Cron jobinfo_field_cron_unvalid=Cron格式非法
jobinfo_field_author=负责人 jobinfo_field_author=负责人
jobinfo_field_alarmemail=报警邮件 jobinfo_field_alarmemail=报警邮件
jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔 jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment