jfinal的controller默认访问的方法是什么

index()方法;

如:
@Controller("/test/exam")
public class TestController


如下请求请求:http://localhost:8080/test/exam.htm (同http://localhost:8080/test/exam/index.htm)

将默认访问controller中的index()方法:

public void index() {
   setAttr("AA", 123);
render("/test/examList.html");
}

posted on 2018-10-15 10:18  小甜瓜安东泥  阅读(927)  评论(1编辑  收藏  举报