1 16 17 package org.springframework.ui.freemarker; 18 19 import java.io.IOException ; 20 import java.io.StringWriter ; 21 22 import freemarker.template.Template; 23 import freemarker.template.TemplateException; 24 25 32 public abstract class FreeMarkerTemplateUtils { 33 34 46 public static String processTemplateIntoString(Template template, Object model) 47 throws IOException , TemplateException { 48 StringWriter result = new StringWriter (); 49 template.process(model, result); 50 return result.toString(); 51 } 52 53 } 54 | Popular Tags |