修改:去除多余依赖
This commit is contained in:
parent
8f26b66e35
commit
1b54d52cf0
@ -1,7 +1,5 @@
|
|||||||
package com.haogames.core.util;
|
package com.haogames.core.util;
|
||||||
|
|
||||||
import com.jfinal.kit.Kv;
|
|
||||||
import com.jfinal.template.Engine;
|
|
||||||
import org.redkale.convert.json.JsonConvert;
|
import org.redkale.convert.json.JsonConvert;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -162,30 +160,4 @@ public final class FileKit {
|
|||||||
return JsonConvert.root().convertFrom(typeToken, inputStream);
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,31 @@
|
|||||||
package com.zdemo;
|
package com.zdemo;
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class Event<V> {
|
public class Event<V> {
|
||||||
private String topic;
|
private String topic;
|
||||||
private String key;
|
private String key;
|
||||||
private V value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user