【发布时间】:2012-08-04 19:24:04
【问题描述】:
我的游戏运行完美,但我加载了示例项目表单并对其进行了一些更改。现在我遇到了一个我自己无法解决的问题。
我的路线如下所示:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Login.blank()
# Login
GET /login controllers.Login.blank()
# Signup
GET /signup controllers.SignUp.blank()
GET /users/fakeuser controllers.SignUp.edit()
POST /signup controllers.SignUp.submit()
# Contact
GET /contacts controllers.Contacts.blank()
GET /contacts/fakecontact controllers.Contacts.edit()
POST /contacts controllers.Contacts.submit()
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
如您所见,前两行重定向到 Login.blank()
问题是如果我这样做:
cd forms
play
run
然后转到 localhost:9000/login
我收到以下错误:
Action not found
1GET/controllers.Application.index()
2GET/signupcontrollers.SignUp.blank()
3GET/users/fakeusercontrollers.SignUp.edit()
4POST/signupcontrollers.SignUp.submit()
5GET/contactscontrollers.Contacts.blank()
6GET/contacts/fakecontactcontrollers.Contacts.edit()
7POST/contactscontrollers.Contacts.submit()
8GET/assets/$file<.+>controllers.Assets.at(path:String = "/public", file:String)
如您所见,Play!没有更新路由文件。它使用旧的。
知道如何解决这个问题吗?
【问题讨论】:
-
试试
clean然后run。 -
是的,谢谢,这有效。
-
@nico_ekito - 还有什么可能导致这种情况的吗?我做过一次
play debug,从那以后重新编译对我不起作用。