我有一个相当简单的应用程序,在本地运行良好,使用正确的路由,即:/conf/routes 用于大多数应用程序路由,/module/securesocial/conf 用于适合该模块的路由。
但是一旦我发布到heroku,只使用securesocial路由,所以我收到一条错误消息“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/route 文件:
# 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 发行版中提供的示例)......
如果你能发现我做错了什么,我肯定会从课程修正中受益。
谢谢,芯片