为JFial提供的插件,让JFial应用程序轻松使用Rythm模版引擎。使用方法:
1.加入发布包中的jar文件到你的JFial应用程序lib目录
2.配置插件:
privatePropertiescof=ull;publicvoidcofigCostat(Costatsme){this.cof=loadPropertyFile("path/to/properties/");}publicvoidcofigPlugi(Plugisme){...me.add(ewRythmPlugi(cof));}3.在你的配置文件中加入:
#设置模版根目录到WEB-INF/rythmrythm.home.template=../rythm#支持国际化rythm.i18.eabled=true4.然后你就可以用Rythm来写你的模版。这里有两个示例程序可供参考:
https://github.com/greelaw110/jfial-bbs (主页可以演示国际化,参见此视频)https://github.com/greelaw110/jfial-rythm-demo






评论