具有默认字符串值的HTTP查询参数

时间:2015-08-12 14:56:47

标签: playframework playframework-2.3

我似乎无法获得具有默认字符串值的查询参数。下面的路由生成编译错误。如果我删除="default value"参数的type,则编译正常。请注意,带有默认int值的"page"参数也可以正常工作。

GET   /version   controllers.Application.version(appId:String, buildVersion:Integer, type:String?="default value", page: Int?=2)

编译错误:

[error] /Users/hyling/Documents/AppConfigServer/conf/routes:8: illegal start of simple expression
[error] GET     /version                    controllers.Application.version(appId:String, buildVersion:Integer, type:String?="default")
[error] /Users/hyling/Documents/AppConfigServer/conf/routes:8: ')' expected but '}' found.
[error] GET     /version                    controllers.Application.version(appId:String, buildVersion:Integer, type:String?="default")

0 个答案:

没有答案