6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

playframeworkのroutingでListを受ける

Posted at

playframeworkのrouteで受けれるのは以下の型

Play 2.x supports the following query string parameter types:
String
Char
Int
Integer (Java)
Long (Scala and Java)
Double (Scala and Java)
Float (Scala and Java)
Boolean (Scala and Java)
java.util.UUID
Option
Optional (Java)
Seq
List (Scala and Java)
Array
See Binders.scala for all supported types.

http://stackoverflow.com/questions/31684919/how-to-route-map-like-parameters-in-get-request-with-play

routes定義

routes
GET    /hoge/list    @controllers.HogeController.list(query: List[String])

Controller定義

HogeController.scala
def list(query: List[String])

クエリ

/hoge/fuga?query=AAAA&query=BBBB

参考

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?