play之路由 routes

routes

play的路由保存在conf/routes文件夹

类似于这个样子:

# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~

# Home page
GET / Application.index
GET /menu/{userid} Application.menu

GET /tv TvScheduleAction.index

# Catch all
* /BusWeb/{controllername}/{actionname}.action   Application.switcher
* /BusWeb/system/updatefile    Application.switcher(controllername:'system',actionname:'updatefile')
* /plugin


public static void switcher(String controllername, String actionname)

throws Exception {
        
        String actionUrl = "/" + controllername.toUpperCase() + "/" + actionname.toUpperCase();
//处理业务
}

上面是一个特殊的例子。

具体的参考http://blog.csdn.net/jasper_success/article/details/48370235

这里只说一下play插件的路由。

原文地址:https://www.cnblogs.com/feiyunaima/p/6307128.html