zoukankan      html  css  js  c++  java
  • 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插件的路由。

  • 相关阅读:
    JS生成Guid
    MVC——分页
    MVC入门——删除页
    MVC入门——编辑页
    MVC入门——详细页
    MVC入门——列表页
    MVC入门——增
    pandas使用
    简单线性回归预测实现
    flask 自定义url转换器
  • 原文地址:https://www.cnblogs.com/feiyunaima/p/6307128.html
Copyright © 2011-2022 走看看