我想拦截请求/响应查询参数,我该如何使用泽西?
类似于JSON:
@Provider
public class ObjectMapperContextResolver implements ContextResolver<ObjectMapper> {
//...
}
Bean Param:
public class FooQueryParam {
@QueryParam(value = "color")
private Color color;
public Color getColor() {
return color;
}
public void setStatus(Color Color) {
this.color = color;
}
}
资源:
public Response get(@BeanParam FooQueryParam fooQueryParam) {
//...
}