Comments (1)
jetx 1.x
props.put(JetConfig.COMPILE_DEBUG, "false");
props.put(JetConfig.IMPORT_PACKAGES, "com.mitchellbosecke.benchmark.model.*");
props.put(JetConfig.TEMPLATE_LOADER, ClasspathResourceLoader.class.getName());
props.put(JetConfig.TEMPLATE_PATH, "/");
props.put(JetConfig.COMPILE_PATH, "target/jetx");
that is OK. and you can call macro using ${item_detail(item, for.index)}
jetx 2.x
I changed the resource loader config at version 2.
props.put(JetConfig.IMPORT_CLASSES, "com.mitchellbosecke.benchmark.model.*");
// default config
props.put(JetConfig.TEMPLATE_LOADERS, ClasspathResourceLoader.class.getName());
// allow config root path and others for each resource loader
//props.put(JetConfig.TEMPLATE_LOADERS, "$loader");
//props.put("$loader", ClasspathResourceLoader.class.getName());
//props.put("$loader.root", "/");
More available configurations you can see:
- https://github.com/subchen/jetbrick-template-2x/blob/master/jetbrick-template/src/main/java/jetbrick/template/JetConfig.java#L35-L55
- http://subchen.github.io/jetbrick-template/2x/config.html#1106755817
and you can call macro using #call item_detail(item, for.index)
from jetbrick-template-2x.
Related Issues (20)
- 请问怎么把ajax请求到的json渲染到模板上? HOT 4
- 通过launch4j把jar生产exe后,不能读取模板资源 HOT 8
- 添加springframework相关tag HOT 1
- Last modified exception thrown HOT 3
- spring boot模板文件加载失败 HOT 4
- 在websphere上报错,帮忙分析一下,谢谢! HOT 2
- jetbrick-template是否支持I18N? HOT 4
- 模板文件在带有空格的目录中提示找不到 HOT 1
- 如何关闭Info日志? HOT 5
- jetbrick-template-web模板变量WEBROOT不能获取正确的scheme HOT 1
- 和spring-boot 2.0 ANTLR 版本不一致 HOT 2
- Exception in thread "main" java.lang.NoClassDefFoundError: caused by Dependency conflict issue for com.github.subchen:jetbrick-commons:jar HOT 2
- 2x 版本 Java11 运行错误 HOT 8
- An illegal reflective access operation has occurred HOT 2
- 宏 Macro的参数值来自于调用页面的${变量}值,如何传递? HOT 4
- visitor模式 怎么解析? HOT 1
- 关于.g4文件匹配原则问题 HOT 15
- 模版输出换行问题 HOT 1
- 为什么声明会多出换行???VM模板就不会这个问题 HOT 10
- 还有类加载器不应该通过当前线程获取 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetbrick-template-2x.