goja-web/src/main/java/goja/mvc/Freemarkers.java
public static String renderStrTemplate(String strTemplat, Map<String, Object> renderParams) {
        stringLoader.putTemplate(UPDATE_RESPONSE_TEMPLATE, strTemplat);
        stringConfig.setTemplateLoader(stringLoader);
        Writer out = new StringWriter(2048);

        try {
            Template tpl = stringConfig.getTemplate(UPDATE_RESPONSE_TEMPLATE, StringPool.UTF_8);
            tpl.process(renderParams, out);
        } catch (IOException e) {
            Logger.error("Get update response template occurs error.", e);
        } catch (TemplateException e) {
            Logger.error("Process template occurs error.template content is:\n {}", e, strTemplat);
            throw new IllegalArgumentException("Error update response template.", e);
        }

        return out.toString();
    }
public static String renderStrTemplate(String strTemplat, Map<String, Object> renderParams) {
        stringLoader.putTemplate(UPDATE_RESPONSE_TEMPLATE, strTemplat);
        stringConfig.setTemplateLoader(stringLoader);
        Writer out = new StringWriter(2048);

        try {
            Template tpl = stringConfig.getTemplate(UPDATE_RESPONSE_TEMPLATE, StringPool.UTF_8);
            tpl.process(renderParams, out);
        } catch (IOException e) {
            Logger.error("Get update response template occurs error.", e);
        } catch (TemplateException e) {
            Logger.error("Process template occurs error.template content is:\n {}", e, strTemplat);
            throw new IllegalArgumentException("Error update response template.", e);
        }

        return out.toString();
    }
将Freemakrer的字符串模版，渲染参数为字符串形式的结果。

@param strTemplat   字符串模版，而不是文件模版
@param renderParams 渲染参数
@return 字符串形式的渲染结果