2

我的游戏运行完美,但我加载了示例项目表单并对其进行了一些更改。现在我遇到了一个我自己无法解决的问题。

我的路线如下所示:

# 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)

如您所见,播放!没有更新路由文件。它使用旧的。

知道如何解决这个问题吗?

4

1 回答 1

4

做一个play clean然后play run

有时,Play 的路由文件有问题。

于 2012-08-04T11:24:04.003 回答