Java Code Examples for com.jfinal.config.Routes#add()

The following examples show how to use com.jfinal.config.Routes#add() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DemoConfig.java    From sqlhelper with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * 配置路由
 */
public void configRoute(Routes me) {
	me.add("/", IndexController.class, "/index");	// 第三个参数为该Controller的视图存放路径
	me.add("/blog", BlogController.class);			// 第三个参数省略时默认与第一个参数值相同,在此即为 "/blog"
}
 
Example 2
Source File: XlsConfig.java    From jfinal-ext3 with Apache License 2.0 4 votes vote down vote up
@Override
public void configRoute(Routes me) {
    me.add("/poi", XlsController.class);
}
 
Example 3
Source File: WeixinConfig.java    From jfinal-weixin with Apache License 2.0 4 votes vote down vote up
public void configRoute(Routes me) {
	me.add("/msg", WeixinMsgController.class);
	me.add("/api", WeixinApiController.class, "/api");
	me.add("/pay", WeixinPayController.class);
}
 
Example 4
Source File: JFinalConfigExt.java    From jfinal-ext3 with Apache License 2.0 2 votes vote down vote up
/**
 * Config route
 * Config the AutoBindRoutes
 * 自动bindRoute。controller命名为xxController。<br/>
 * AutoBindRoutes自动取xxController对应的class的Controller之前的xx作为controllerKey(path)<br/>
 * 如:MyUserController => myuser; UserController => user; UseradminController => useradmin<br/>
 */
public void configRoute(Routes me) {
	me.add(new AutoBindRoutes());
	// config others
	configMoreRoutes(me);
}