admin管理员组文章数量:1333450
I have a simple api
@GET
@Path("res/{res-path :.*}")
public Response getRes(@PathParam("res-path") String resource) {
System.out.println(resource);
}
I was under impression that this should capture anything after res/ into resource but it is not the case !
URL : res/res2 -----> Prints res2 (accepted)
URL : res/res2/res3 -----> Prints res2/res3 (accepted)
BUT
URL : res/res -----> Prints EMPTY STRING (instead of res/)
URL : res/res/res2 -----> Prints res2 (instead of res/res2)
Any suggestions or thoughts?
本文标签: jax rsJAXRS uri template not capturing expected stringStack Overflow
版权声明:本文标题:jax rs - JAX-RS uri template not capturing expected string - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742353018a2458867.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论