我正在将Jerset1.x客户端项目迁移到Jersey2.0。我发现GZIPContentEncodingFilter不存在了。有类似的吗?我偶然发现了GZIPEncoder,但不确定如何插入它。在Jersey1.17中,我使用:WebResourcer=...r.register(newGZIPContentEncodingFilter());在Jersey2.0中,我搜索类似这样的东西:WebTargetr=...r.register(newGZIPContentEncodingFilter()); 最佳答案 使用WebTarg