クエリ パラメータ名が固定されていないという要件があります。すなわち
/テスト/追加?a=b,c&a1=b1,c1
/テスト/追加?d=e,f&c1=d1,f1
@Context URI、HttpServlerRequest を使用するという記事を読んだことがあります。
これをJerseyに実装する方法を教えてください。
次のようにUriInfoをクラスに追加できます。
public class Example {
@Context
UriInfo uriInfo;
@GET
@Path("/")
public void get() {
System.out.println(uriInfo.getPathParameters());
}
}