Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Configuring the Velocity engine
// create the velocity engine
final VelocityEngine velocity = new VelocityEngine();
// set the logger to our Log4J root logger
velocity.setProperty("runtime.log.logsystem.log4j.logger", "root");
// use the resource loader as it's easy with Maven's path setup
velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
velocity.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
// make sure to call init before using the engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.