Handling Multiple Query Parameters in Jersey

前端 未结 3 920
萌比男神i
萌比男神i 2020-12-08 04:30

In the web service I\'m working on, I need to implement a URI with query parameters which look like /stats?store=A&store=B&item=C&item=D

To

3条回答
  •  隐瞒了意图╮
    2020-12-08 04:40

    List items=ui.getQueryParameters().get("item");

    where ui is declared as a member in the rest resource like so :

    @Context UriInfo ui;
    

    the downside is that it doesn't appear in the methods arguments at all.

提交回复
热议问题