Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JAX-RS选项路径参数不工作_Jax Rs - Fatal编程技术网

JAX-RS选项路径参数不工作

JAX-RS选项路径参数不工作,jax-rs,Jax Rs,我试图使用以下构造 @ApplicationPath("app") @Path("api/{userid}/model") public class ModelService { @Get @Path("{modelid: (.*)?}") public Response removePreProcessor(@PathParam("userid") String sUserId, @PathParam("preprocessorid") String sPreProcesso

我试图使用以下构造

@ApplicationPath("app")
@Path("api/{userid}/model")
public class ModelService
{
   @Get
   @Path("{modelid: (.*)?}")
   public Response removePreProcessor(@PathParam("userid") String sUserId, @PathParam("preprocessorid") String sPreProcessorId)
   {
       return Response.build();
   }
}
我无法访问以下两个REST URL

GET http://localhost:8080/XXXX/app/api/xyz/model
GET http://localhost:8080/XXXX/app/api/xyz/model/123
让我知道我做错了什么


-提前谢谢

当我读到你的问题时,有几件事看起来很奇怪,但它们可能与上下文有关

但有一件事似乎是错的:

您正在使用一个
@PathParam(“预处理器”)
,但我在您的路径中看不到这个参数

你有日志吗