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
Post a Comment