This is on 2.6.15, no other versions tested.
I created a split routes file in the conf/
folder, so now there is the classic routes
and my.routes
In routes
, the very first line reads:
-> /proj/my my.Routes
And my.routes
just contains routes like
GET /files/ mypackage.controllers.my.MyController.getFiles()
The controller has been moved to the appropriate folder.
After compiling, I checked the RoutesPrefix.scala
in target/scala-2.12/routes/main/my
It reads like this:
package my {
object RoutesPrefix {
private var _prefix: String = "/"
def setPrefix(p: String): Unit = {
_prefix = p
}
def prefix: String = _prefix
val byNamePrefix: Function0[String] = { () => prefix }
}
}
Which, apart from the package, is identical to the RoutesPrefix
of main/router/
I would expect this line:
private var _prefix: String = "/"
to be
private var _prefix: String = "/proj/my"
As read from the routes
file.
I tested it, it is generating routes without the correct prefix.
What am I doing wrong? Or is this a bug?