Routes file error in playframework 2.0

This is one of the lines in the routes file:

GET  /detail controllers.Message.detail(type: String, text: String, page: Integer ?= 0)

When I tried to load the page, she highlighted this line and indicated "ID expected, but" type "found." Now, if I change the setting from type: Stringto newType: String, the page will load normally.

What is the problem with the word type? Are there any reserved words in the routes file?

+3
source share
1 answer

typeis the Scala keyword. You cannot use them in your routes file. See also this ticket: https://play.lighthouseapp.com/projects/82401/tickets/69-compilation-error-when-using-backticked-scala-keywords-on-routes-file

+5
source

All Articles