DemoConfig类中路由配置为:
@Override
public void configRoute(Routes me) {
// TODO Auto-generated method stub
//me.add("/hello",ZHUFEIJFinalController.class);
me.add("hello",ZHUFEIJFinalController.class);
}控制类为:
// 单个参数方法
public void test1(String name){
System.out.println("单个参数的方法");
System.out.println(getPara());
renderText(getPara(name));
}在浏览器输入 http://localhost/hello/test1/111 ,访问提示警告: 404 Action Not Found: /hello/test1/111,看到官网的访问方式就是controllerKey/method/v0-v1这种方式啊!
项目:JFinal
配置好以后,直接就这个参数:
renderText(name),不需要再 getPara 了