goja-web/src/main/java/goja/mvc/Freemarkers.java
public static String processString(String tpl, Map<String, Object> renderParams) {
        if (appConfig == null) {
            getAppConfiguration();
        }
        StringWriter result = new StringWriter();
        try {
            Template template = appConfig.getTemplate(tpl);
            template.process(renderParams, result);
        } catch (IOException e) {
            throw new RenderException(e);
        } catch (TemplateException e) {
            throw new RenderException(e);
        }
        return result.toString();
    }
public static String processString(String tpl, Map<String, Object> renderParams) {
        if (appConfig == null) {
            getAppConfiguration();
        }
        StringWriter result = new StringWriter();
        try {
            Template template = appConfig.getTemplate(tpl);
            template.process(renderParams, result);
        } catch (IOException e) {
            throw new RenderException(e);
        } catch (TemplateException e) {
            throw new RenderException(e);
        }
        return result.toString();
    }
public static String processString ( String tpl , Map < String , Object > renderParams ) { if ( appConfig == null ) { getAppConfiguration ( ) ; } StringWriter result = new StringWriter ( ) ; try { Template template = appConfig . getTemplate ( tpl ) ; template . process ( renderParams , result ) ; } catch ( IOException e ) { throw new RenderException ( e ) ; } catch ( TemplateException e ) { throw new RenderException ( e ) ; } return result . toString ( ) ; }
渲染模版为字符串，并制定参数

@param tpl          模版
@param renderParams 参数信息
@return 渲染后的字符串
渲染模版为字符串，并制定参数