回答:
@Rubenによって提供された上記の説明に加えて、Spring RESTFull実装でも同じものを参照できることを付け加えておきます。
JAX- RS仕様@PathParam-URIテンプレートパラメータまたはテンプレートパラメータを含むパスセグメントの値を、リソースメソッドパラメータ、リソースクラスフィールド、またはリソースクラスBeanプロパティにバインドします。
@Path("/users/{username}")
public class UserResource {
        @GET
        @Produces("text/xml")
        public String getUser(@PathParam("username") String userName) {
            ...
        }
    }
@QueryParam-HTTPクエリパラメータの値をリソースメソッドパラメータ、リソースクラスフィールド、またはリソースクラスBeanプロパティにバインドします。
URI:users / query?from = 100
@Path("/users")
public class UserService {
    @GET
    @Path("/query")
    public Response getUsers(
        @QueryParam("from") int from){
}}
Springを使用して同じことを達成するには、次を使用できます
@PathVariable(Spring)== @PathParam(Jersey、JAX-RS)、
@RequestParam(Spring)== @QueryParam(Jersey、JAX-RS)
さらに、クエリパラメータはnullにすることができますが、パスパラメータはできません。パスパラメータを追加しないと、404エラーが発生します。したがって、必須としてデータを送信する場合は、パスパラメータを使用できます。
    @javax.ws.rs.QueryParam
    This annotation allows you to extract values from URI query parameters.
    @javax.ws.rs.PathParam
    This annotation allows you to extract values from URI template parameters.
        PART-1 : @javax.ws.rs.PathParam
        @Path("/mercedes")
        public class MercedesService {
        @GET
        @Path("/e55/{year}")
        @Produces("image/jpeg")
        public Jpeg getE55Picture(@PathParam("year") String year) {
        ...
        }
    If I query the JAX-RS service with GET /mercedes/e55/2006, the getE55Picture()
    method would match the incoming request and would be invoked.
    PART-2 : @javax.ws.rs.QueryParam
 URI might look like this: GET /cus?start=0&size=10
        @Path("/cus")
        public class GreedCorruption {
        @GET
        @Produces("application/xml")
        public String getDeathReport(@QueryParam("start") int start,
        @QueryParam("size") int size) {
        ...
        }
        }