我有一個相當簡單的應用程序,在本地正常工作,使用正確的路線,即:大多數應用程序的/ conf /路線路線和適用於該模塊的路線的/ module/securesocial/conf。Playv2.0.3:SecureSocial模塊在推送到heroku後使用(而不是主要路線)
但是,一旦我發佈到heroku,只使用安全社會路由,所以我收到錯誤消息「Action not Found For request GET /」< - 或標準路由文件中定義的任何路由。
當我試圖操縱路徑(例如創建一個全面的路由文件),我得到了很多不同的編譯錯誤...
這裏是我的標準路線:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
GET / controllers.Application.index()
GET /foo controllers.Application.index()
GET /admin controllers.Application.admin()
POST /quote controllers.Application.addQuote()
GET /quotes controllers.Application.getQuotes()
# Login page
GET /login securesocial.controllers.LoginPage.login
GET /logout securesocial.controllers.LoginPage.logout
# User Registration
GET /signup securesocial.controllers.Registration.signUp
POST /signup securesocial.controllers.Registration.handleSignUp
# Providers entry points
GET /authenticate/:provider securesocial.controllers.LoginPage.authenticate(provider)
POST /authenticate/:provider securesocial.controllers.LoginPage.authenticateByPost(provider)
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
這裏是我的/ securesocial/conf目錄/路由文件:
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
# Home page
# GET / controllers.Application.index
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
# Login page
GET /login securesocial.controllers.LoginPage.login
GET /logout securesocial.controllers.LoginPage.logout
# User Registration
GET /signup securesocial.controllers.Registration.signUp
POST /signup securesocial.controllers.Registration.handleSignUp
GET /authenticate/:provider securesocial.controllers.LoginPage.authenticate(provider)
POST /authenticate/:provider securesocial.controllers.LoginPage.authenticateByPost(provider)
我知道有一些重複,但我這是我用來獲取本地安裝工作的配置(和它類似於在securesocial distro中提供的樣本)...
如果你能發現我做錯了什麼,我肯定會從課程更正中受益。
感謝, 芯片
我聽說過這個bug,針對2.1版本發佈。 https://groups.google.com/forum/?fromgroups=#!searchin/play-framework/jorge/play-framework/OVjVmUFj9Mg/TwV8Sz5o4J4J – castlechip