java - Spring load velocity template from string -


i'm using velocityengineutils.mergetemplateintostring() method read velocity templates file send emails. created editor(something ckeditor or cleditor) allow users create own templates , save template content string in database, can freely create own email templates , use them.

but can't find equivalent way velocityengineutils.mergetemplateintostring can load template string. or maybe can suggest me correct way feature.

thanks

spring: 4.06 velocity: 1.7 velocity tool: 2.0

i don't think there's way spring's velocityengineutils you'll need use velocity directly. take @ velocityengine.evaluate. can pass template in string. docs:

renders input string using context output writer. used when template dynamically constructed, or want use velocity token replacer.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -