Play framework 2: Use Array[String] in route

后端 未结 4 687
忘了有多久
忘了有多久 2021-02-05 13:56

I want to generate an url like this:

/photo?tags=tag1,tag2,tag3

routes file:

GET     /photo  controllers.Photos.list         


        
4条回答
  •  醉话见心
    2021-02-05 14:12

    As an aside, if you wish to pass an array of Longs, this works:

    GET /photo controllers.Photos.list(tags: java.util.List[java.lang.Long])

    with the controller function taking List tags as an argument.

提交回复
热议问题