Loading velocity template inside a jar file

前端 未结 5 903
耶瑟儿~
耶瑟儿~ 2020-12-23 19:48

I have a project where I want to load a velocity template to complete it with parameters. The whole application is packaged as a jar file. What I initially thought of doing

5条回答
  •  -上瘾入骨i
    2020-12-23 20:21

    Maybe I have an old version, this is the only thing that worked for me

    ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "class"); 
    ve.setProperty("classpath.resource.loader.class", 
    ClasspathResourceLoader.class.getName());
    

提交回复
热议问题