return getVelocityEngine().getTemplate(url, getEncoding());
}
private VelocityEngine autodetectVelocityEngine() {
try {
VelocityConfig velocityConfig = getApplicationContext().getBean(VelocityConfig.class);
return velocityConfig.getVelocityEngine();
}
catch (NoSuchBeanDefinitionException ex) {
throw new ApplicationContextException("please define a VelocityConfig", ex);
}
}