问题描述
当我为@PathParam
参数添加PathSegment
注释时,Eclipse出现以下错误
类型
javax.ws.rs.core.PathSegment
对此参数无效。有关更多信息,请参见JAX-RS 2.0规范(第3.2节)。 信息。
@GET
@Path("{var1:customers}/{var2:orders}/{month}")
public String getMonthOrders(@PathParam("var1") PathSegment customerPs,// error
@PathParam("var2") PathSegment orderPs,// error
@PathParam("month") String month) {
String info = String.format(
"resource getMonthOrders(). Customers Matrix Param: %s," +
" Orders Matrix Param: %s,month :%s%n",customerPs.getMatrixParameters(),orderPs.getMatrixParameters(),month);
return info;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)