Java Play! 2不重新编译

时间:2012-08-04 10:52:48

标签: java playframework-2.0

我玩得很完美但是我加载了示例项目表单并稍微改了一下。现在我遇到了一个我自己无法解决的问题。

我的路线看起来像这样:

# 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!没有更新路线文件。它使用旧的。

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

1 个答案:

答案 0 :(得分:4)

执行play clean然后play run

有时,Play的路径文件存在问题。