From 393cb759337e7523d8a45742ede710e1a4662a0a Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Fri, 22 Nov 2019 19:31:09 +0800 Subject: [PATCH] upgrade version --- .../src/main/java/com/xxl/job/admin/core/util/FtlUtil.java | 5 ++++- .../main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java index d80e9518..e90af434 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java @@ -4,6 +4,8 @@ import freemarker.ext.beans.BeansWrapper; import freemarker.ext.beans.BeansWrapperBuilder; import freemarker.template.Configuration; import freemarker.template.TemplateHashModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ftl util @@ -11,6 +13,7 @@ import freemarker.template.TemplateHashModel; * @author xuxueli 2018-01-17 20:37:48 */ public class FtlUtil { + private static Logger logger = LoggerFactory.getLogger(FtlUtil.class); private static BeansWrapper wrapper = new BeansWrapperBuilder(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS).build(); //BeansWrapper.getDefaultInstance(); @@ -20,7 +23,7 @@ public class FtlUtil { TemplateHashModel fileStatics = (TemplateHashModel) staticModels.get(packageName); return fileStatics; } catch (Exception e) { - e.printStackTrace(); + logger.error(e.getMessage(), e); } return null; } diff --git a/xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java b/xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java index 3fde3aeb..3d0d9526 100644 --- a/xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java +++ b/xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java @@ -98,7 +98,7 @@ public class XxlJobRemotingUtil { } return returnT; } catch (Exception e) { - e.printStackTrace(); + logger.error(e.getMessage(), e); return new ReturnT(ReturnT.FAIL_CODE, "xxl-rpc remoting response content invalid("+ resultJson +"), for url : " + url); }