我有一条看起来像这样的路线:
/foobar/123/2
我想使用所有三个参数来获取一个对象,以便我可以使用这样的东西:
@Path("/{type}/{id}/{version}")
public Response getEntity(Entity entity);
代替:
@Path("/{type}/{id}/{version}")
public Response getEntity(@PathParam("type") Type type, @PathParam("id") Long entityId, @PathParam("version") Long version);
ParamConverter
看起来很有希望,但是它只能处理一个String
而不是三个。还有什么我可以尝试的吗?