java - Is there a way to use Apache Velocity with .properties file? -


i've json template in property file in project. there way can use apache velocity embedding dynamic content without using .vm file ?

i've like:

 template = [ { "name" : "$firstname $lastname" } ]; 

in .properties file. when parse json , store corresponding value want use velocity can firstname , lastname dynamically.

you asking how load velocity template value in properties file instead of template file.

you can writing custom resourceloader velocity. resource loader parse properties file , return template stored property value.

for work, have configure velocity use resource loader instead of 1 using.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -