Play framework 2: Use Array[String] in route

后端 未结 4 688
忘了有多久
忘了有多久 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:28

    Using a list instead of an array should work.

    If you are using Java, it works like this:

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

提交回复
热议问题