Skip to content

Instantly share code, notes, and snippets.

@calvincodes
Created June 27, 2017 05:13
Show Gist options
  • Save calvincodes/306525825332ab57f9cc1af0e8a8fbc8 to your computer and use it in GitHub Desktop.
Save calvincodes/306525825332ab57f9cc1af0e8a8fbc8 to your computer and use it in GitHub Desktop.
// Configure Velocity Engine with NO LOG mode
Velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new NullLogChute());
Velocity.init();
VelocityContext velocityContext = new VelocityContext(renderKeyValueMap);
StringWriter populatedVelocityTemplate = new StringWriter();
Velocity.evaluate(velocityContext, populatedVelocityTemplate, templateName, templateBody);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment