1、代码优化,重构逻辑,界面html
2、解决TplKit 因升级导致的模板文件找不到(退回原版本)
This commit is contained in:
@@ -14,7 +14,6 @@ public class TplKit {
|
||||
private static TplKit tplKit = null;
|
||||
private static SqlKit kit = null;
|
||||
private static boolean hadParse = false;// 标记 是否已经解析
|
||||
private static String clazzRoot = new File(FileKit.rootPath()).getPath();
|
||||
|
||||
public static TplKit use() {
|
||||
return use(false);
|
||||
@@ -22,7 +21,7 @@ public class TplKit {
|
||||
|
||||
/**
|
||||
* 获取单列的实例对象,
|
||||
*
|
||||
*
|
||||
* @param isDev
|
||||
* 是否开发模式, 多次调用只有第一次的 isDev生效
|
||||
* @return
|
||||
@@ -38,6 +37,7 @@ public class TplKit {
|
||||
|
||||
private TplKit(boolean isDev) {
|
||||
kit = new SqlKit("tplKit", isDev);
|
||||
kit.setBaseSqlTemplatePath("/");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,9 +54,9 @@ public class TplKit {
|
||||
|
||||
/**
|
||||
* 添加文件/目录 到模板解析器
|
||||
*
|
||||
*
|
||||
* @param tplFile
|
||||
* 文件/目录必须放到 resources/下面
|
||||
* 模板文件/目录
|
||||
*/
|
||||
public void addTpl(File tplFile) {
|
||||
addTpl(tplFile, null);
|
||||
@@ -65,7 +65,7 @@ public class TplKit {
|
||||
|
||||
/**
|
||||
* 添加文件/目录 到模板解析器
|
||||
*
|
||||
*
|
||||
* @param tplFile
|
||||
* 文件/目录
|
||||
* @param filter
|
||||
@@ -73,7 +73,8 @@ public class TplKit {
|
||||
*/
|
||||
public void addTpl(File tplFile, FileFilter filter) {
|
||||
if (tplFile.isFile()) {
|
||||
addTpl(tplFile.getPath().replace(clazzRoot, "")); //以classes路径开始的路径
|
||||
addTpl(tplFile.getPath());
|
||||
//addTpl(tplFile.getPath().replace(clazzRoot, "")); //以classes路径开始的路径
|
||||
} else if (tplFile.isDirectory()) {
|
||||
File[] files = tplFile.listFiles(filter);
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user