@Override
    public String createTemplate(final String contents, final Map<String, ?> templateParams) throws Exception {
        val engine = new GStringTemplateEngine();
        val template = engine.createTemplate(contents).make(templateParams);
        return template.toString();
    }
This is {@link GroovyExecutableCompiledScriptFactory}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-scripting/src/main/java/org/apereo/cas/util/scripting/GroovyExecutableCompiledScriptFactory.java