eclipse插件开发中,无法获取velocity模板
ringa_lee
ringa_lee 2017-04-21 10:56:54
0
1
722
VelocityEngine ve = new VelocityEngine();
Properties p = new Properties();
p.put(Velocity.FILE_RESOURCE_LOADER_PATH, Activator.getDefault().getBundle().getLocation().replaceAll("reference:file:/", "") + "template");
ve.init(p);
Template template = ve.getTemplate(templateFilePath, inEncode);

上面的代码,在开发环境下是可以获取vm模板的,但是项目打成jar包后,放到eclipse的plugins目录下后,就找不到vm文件了。(vm文件已经打到jar包了)

其实就是想问p.put()的第二个参数,应该填啥。求指导,谢谢了。

ringa_lee
ringa_lee

ringa_lee

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!