クライアントは、パスは同じでクエリ文字列が異なる2つのURLを要求する場合があります。
1. /hello
2. /hello?name=Mike
ジャージを使用して、それぞれに2つの異なる方法を定義するにはどうすればよいですか?
次に例を示します。
@Path("/hello")
public class HelloResource {
@Produces("text/plain")
public String justHello() {}
// how to call this method only the query string has "name"
@Produces("text/plain")
public String helloWithName() {}
}