Java – play framework routing does not work

I just want to follow the zentasks tutorial of the play framework( http://www.playframework.com/documentation/2.1.0/JavaGuide4 )I can't seem to make the login page work

I'm running this project with the play ~ stun command Error navigating to 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)`

My route file looks like

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

And application The login, authenticate and logout functions can be compiled correctly I missed some very easy things here because I don't know what's wrong?

Solution

It appears that the routing file was not compiled correctly Maybe, you should clean it on the game console and try again

$play clean-all
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>