私は、Play Framework用のZenTasksチュートリアル(http://www.playframework.com/documentation/2.1.0/JavaGuide4)に従っています。しかし、私はログインページが動作するように見えることはできません。Play Framework Routesが動作しない
私はこのプロジェクトを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のように見える、認証、およびログアウト機能はすべて正常にコンパイルします。私は間違って何が起こっているのか分からないので、ここで信じられないほど簡単に何かを見逃していますか?
はありません、あなたの 'routes'ファイルが正常に見えます。 Playアプリケーションを再起動することはできますか? – Carsten
適切なアプリケーションを開始しましたか?あなたのルートファイルには2つのルートしか検出されておらず、2つのルートは新しく生成されたプロジェクトに存在するデフォルトルートです。 –
@Carsten私は自分のアプリケーションを再起動しました。 –