playframework - Play framework production reverse routing -
I am trying to set up my play project so that some routes will not be shown in production for development purposes I have difficulty in reverse routing.
Here are my root files, simplified:
route (development)
received / controller. application . Index () GET / Bar Controller Foo.bar ()
output.rout
get / controller Application.index ()
In home.scala.html, I have something like this:
@if (play.lay.application (). Configuration (). GetString ("Application .mode")! = "Production") {& lt; A href = "@ routes.Foo.bar" & gt; This link does not appear in the production & lt; / A & gt; }
When running the project in production mode, the file will not be compiled because this path can not be found:
The value is not a Foo object controllers. Member of Route
Any ideas on how to deal with this problem?
You have to be the only way to output, the path file has been compiled, a check in the controller Use if you do not want any access to that method in your production mode.
Comments
Post a Comment