Jersey路径参数:多个反斜杠分隔的参数


@Path("/assetViewCount/{path}")

上面的注释可以用来检索myValue路径 url,如/assetViewCount/myValue。

如何从/assetViewCount/myValue/nextValue路径

获取myValue/nextValue

实际上我找到了我的问题的解决方案,下面的注释给出了/assetViewCount/之后的任何内容到{path}

@Path("/assetViewCount/{path:.*}")

你可以在Path中使用这样的嵌入参数:

@Path("/assetViewCount/{path}/nextValue")

最新更新