ReatEasy+用户指南----第9章@MatrixParam

转载说明出处:http://blog.csdn.net/nndtdx/article/details/6870391

原文地址 http://docs.jboss.org/resteasy/docs/2.2.1.GA/userguide/html/index.html

只是分享,如有侵权,麻烦联系我删除,谢谢。

Matrix param的做法是你可以在uri 的path segmen中嵌入任意个数个name 和value的键值对。下边是一个例子

GET http://host.com/library/book;name=EJB 3.0;author=Bill Burke

Matrixparameters的基本思想是 这些参数代表了一个资源。 @MatrixParam 的声明允许你在uri中传入参数,以供方法调用使用。

在当前的版本中,使用@ MatrixParam有一个大问题。如果相同的MatrixParam在不同的segments中出现两次,在这种情况下,最好将pathparam和pathsegment结合起来使用。

第九章完

原文地址:https://www.cnblogs.com/yzw23333/p/7234123.html