use of org.beetl.core.resource.StringTemplateResourceLoader in project beetl2.0 by javamonkey.
the class NativeTest method testSecurity.
@Test
public void testSecurity() throws Exception {
StringTemplateResourceLoader resourceLoader = new StringTemplateResourceLoader();
Configuration cfg = Configuration.defaultConfiguration();
GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);
Template t = gt.getTemplate("hello,${@java.lang.System.currentTimeMillis()}");
String str = t.render();
AssertJUnit.assertEquals("hello,", str);
}
Aggregations