Вопрос

I am trying a documented routes example for Play 2.1.1

routes

# The version parameter is optional. E.g. /api/list-all?version=3.0
GET   /api/list-all         controllers.Api.list(Option[version])

And then

$ play-2.1.1 compile
[error] /home/paul/server/conf/routes:2: Compilation error[`)' expected but `[' found]

What is going wrong?

Это было полезно?

Решение

It should be like this:

GET   /api/list-all         controllers.Api.list(version: Option[String])
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top