.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user