protected VelocityEngine getVelocityEngine ( List < String > paths ) { VelocityEngine ve = new VelocityEngine ( ) ; ve . setProperty ( RuntimeConstants . RESOURCE_LOADER , "file" ) ; ve . setProperty ( "cp.resource.loader.class" , "org.apache.velocity.runtime.resource.loader.FileResourceLoader" ) ; ve . setProperty ( "cp.resource.loader.cache" , "true" ) ; ve . setProperty ( "cp.resource.loader.path" , StringUtils . join ( paths , "," ) ) ; ve . setProperty ( "cp.resource.loader.modificationCheckInterval " , "10" ) ; ve . setProperty ( "input.encoding" , "UTF-8" ) ; ve . setProperty ( "output.encoding" , "UTF-8" ) ; ve . setProperty ( "runtime.log" , "" ) ; return ve ; }
Sets velocity up to load resources from a list of paths .