This commit is contained in:
2019-04-15 17:36:06 +08:00
parent fe3ea393ba
commit 9a7953aa47
23 changed files with 325 additions and 536 deletions

View File

@@ -2,7 +2,9 @@ package net.tccn.service;
import com.arangodb.Predicate;
import com.google.gson.Gson;
import net.tccn.base.FileKit;
import net.tccn.base.MetaKit;
import net.tccn.base.TplKit;
import org.redkale.net.http.RestMapping;
import org.redkale.service.Service;
import org.redkale.source.CacheSource;
@@ -52,7 +54,13 @@ public class BaseService implements Service {
@Resource(name = "APP_HOME")
protected File APP_HOME;
@Resource(name = "property.tplPath")
private String tplPath;
public static Properties prop = new Properties();
protected static TplKit tplKit = TplKit.use(true);
private static boolean tplInit = false;
@Override
public void init(AnyValue config) {
@@ -64,6 +72,16 @@ public class BaseService implements Service {
} catch (IOException e) {
e.printStackTrace();
}
try {
if (!tplInit) {
tplInit = true;
tplKit.addTpl(new File(FileKit.rootPath(), tplPath));
}
} catch (Exception e) {
e.printStackTrace();
}
}
@RestMapping(ignore = true)