From 1b54d52cf07ce37f191ab26a9c22a6c7238e48a7 Mon Sep 17 00:00:00 2001 From: lxy <237809796@qq.com> Date: Sun, 16 Aug 2020 20:49:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/haogames/core/util/FileKit.java | 28 ------------------------ src/com/zdemo/Event.java | 29 ++++++++++++++++++++----- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/src/com/haogames/core/util/FileKit.java b/src/com/haogames/core/util/FileKit.java index d810e3d..8307cef 100644 --- a/src/com/haogames/core/util/FileKit.java +++ b/src/com/haogames/core/util/FileKit.java @@ -1,7 +1,5 @@ package com.haogames.core.util; -import com.jfinal.kit.Kv; -import com.jfinal.template.Engine; import org.redkale.convert.json.JsonConvert; import java.io.*; @@ -162,30 +160,4 @@ public final class FileKit { return JsonConvert.root().convertFrom(typeToken, inputStream); } } - - /** - * 渲染模板到文件 - * - * @param sourceStr - * @param target - * @param kv - */ - public static void tplRender(String sourceStr, File target, Kv kv) { - String str = ""; - if (sourceStr != null && !sourceStr.isEmpty()) { - str = Engine.use().getTemplateByString(sourceStr).renderToString(kv); - } - strToFile(str, target, true); - } - - /** - * 通过模板创建内容 - * - * @param tplFile - * @param para - */ - public static void tplRender(File tplFile, File file, Map para) throws IOException { - String str = Engine.use().getTemplate(tplFile.getPath()).renderToString(para); - strToFile(str, file); - } } diff --git a/src/com/zdemo/Event.java b/src/com/zdemo/Event.java index 7484b75..af1f4d3 100644 --- a/src/com/zdemo/Event.java +++ b/src/com/zdemo/Event.java @@ -1,12 +1,31 @@ package com.zdemo; -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter public class Event { private String topic; private String key; private V value; + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public V getValue() { + return value; + } + + public void setValue(V value) { + this.value = value; + } }