我只是想跟随 Play Framework 的 ZenTasks 教程(http://www.playframework.com/documentation/2.1.0/JavaGuide4)。但是,我似乎什至无法使登录页面正常工作。
我正在使用play ~run
命令运行这个项目。导航到http://localhost:9000/login
错误时
Action not found For request 'GET /login'
These routes have been tried, in this order:
1 GET/controllers.Application.index()
2 GET/assets/$file<.+>controllers.Assets.at(path:String = "/public", file:String)`
我的路线文件看起来像
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
# User athentication
GET /login controllers.Application.login()
POST /login controllers.Application.authenticate()
GET /logout controllers.Application.logout()
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
并且 Application.login、authenticate 和 logout 函数都可以正确编译。我是否在这里错过了一些非常容易的事情,因为我不知道出了什么问题?