【问题标题】:Routes in Play FrameworkPlay 框架中的路由
【发布时间】:2012-11-16 23:44:56
【问题描述】:

更新我的 Play 应用程序的 conf 目录中的路由文件似乎没有反映。

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

# Home page
GET     /                           controllers.Application.index()
GET     /channel                    controllers.Application.createMember()


# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)

当我在 localhost:9000/channel 向我的服务器发出请求时,它说找不到操作。我的 play 应用程序当前驻留在 Eclipse 工作空间中。

【问题讨论】:

    标签: playframework


    【解决方案1】:

    我只是猜测你添加了路由并试图调用production mode,而使用热重载功能。

    重新启动您的应用程序并再次检查。

    使用play run 命令而不是play start 留在development mode 中(这反映了无需重新部署的代码更改)。它将在下一次浏览器请求后重新编译更改的类。

    如果您使用play ~run,它将在保存更改的类后立即重新编译它们(甚至在下一次请求之前)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-17
      • 1970-01-01
      • 2013-03-19
      • 1970-01-01
      • 2016-09-24
      相关资源
      最近更新 更多