We could try groovy templates. I haven't looked at them yet but just saw this and remembered it exists...

Al Sargent (@alsargent) tweeted at 3:37 AM on Sun, Jun 01, 2014:
Using the innovative Groovy template engine in Spring Boot http://t.co/pr4hYJwcMa
(https://twitter.com/alsargent/status/473005275168141312)

Get the official Twitter app at https://twitter.com/download

---
Lincoln Baxter's Droid
http://ocpsoft.org
"Keep it Simple"