1 快速上手

2 JFinalConfig

3 Controller

4 AOP

5 ActiveRecord

6 Enjoy 模板引擎

7 EhCachePlugin

8 RedisPlugin

9 Cron4jPlugin

10 Validator

11 国际化

12 Json 转换

13 JFinal架构及扩展

14 升级到 5.1.2

14.4 baseViewPath

    baseViewPath 设置由原来的configConstant(…) 方法中转移到了Routes 对象中,并且可以对不同的Routes对象分别设置,如下是示例:

public class FrontRoutes extends Routes {

  public void config() {
    setBaseViewPath("/_view");

    add("/", IndexController.class, "/index");
    add("/project", ProjectController.class);
  }
}

     从configConstant(…)转移到configRoute(…)中的好处是可以分别对不同的Routes进行设置,不同模块的baseViewPath很可能不相同,从而可以减少冗余代码。上面的代码示例是用于Routes拆分后的情况,如果你的应用并没有对Routes进行拆分,只需要在configRoute 中如下配置即可:

public void configRoute(Routes me) {
   me.setBaseViewPath("/_view");

   me.add("/", IndexController.class);
}