Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Freemarker 的新手,我使用 freemarker 作为电子邮件模板。我必须将模板存储在数据库中以供以后使用,并且在存储之前我想验证 freemarker 模板是否有效。那么有没有办法做到这一点?
如果你只想知道模板没有语法错误,你可以调用Template(String, String, Configuration)构造函数,看看它是否抛出异常。
Template(String, String, Configuration)