Our project uses multiple routes files.
The conf/routes
file contains something like:
/some/stuff
...
-> /api/admin admin.Routes
-> /api/user user.Routes
We then have conf/admin.routes
and conf/user.routes
files, which contain the prefixed API routes.
I’m trying to upgrade from Play 2.6 (where this setup has worked fine, as well as on earlier versions), to Play 2.7. When compiling I get the error:
[error] /usr/src/backend/conf/admin.routes:401: value concatPrefix is not a member of object play.api.routing.Router
[error] GET /myAdminRoute @com.my.some.controllers.MyControl.list()
[error] /usr/src/backend/conf/user.routes:140: value concatPrefix is not a member of object play.api.routing.Router
[error] GET /myUserRoute @com.my.other.controllers.MyControl.list()
Looking at Play migration for 2.7:
- I’m not using StaticRoutesGenerator https://www.playframework.com/documentation/2.7.x/Migration27#StaticRoutesGenerator-removed
- Looks suspicious: https://www.playframework.com/documentation/2.7.x/Migration27#StaticRoutesGenerator-removed
Router#withPrefix
should always add a prefix`. But I’m just using Play conf/routes, so I’m not sure what I should be changing?
I assume the issue is because of that Router withPrefix change, but I’m not sure how to interpret it in terms of what I need to update. Has anyone else had this issue with Play 2.7?