如何设置正则表达式@Path("<what_regex>")
以捕获所有可能的路径参数深度(除了特定的某些路径,这些路径应由其他方法处理)?
例如:
/{path1}/{path1}/{path1}/{path1}/{path1}/
等等
同时还要映射以下内容:
/create
/read
/update
/delete
到其他Jax-rs资源方法。
@Singleton
@Path("/")
public class MyRest {
@GET
@Path({pathParam}) /* This works */
public Response getSomething(...){}
@POST
@Path("create") /* Along with this */
public Response createSomething(...){}
// and so on
}